Wenju He a6e870d0b6
[IRLinker] Don't add duplicate named MD node operand to dest module (#146020)
Fix llvm.ident exploding when linking many bitcode files in libclc. This
should de-duplicate other named metadata as well, e.g.
opencl.spir.version and opencl.ocl.version.

This PR is a re-submit of https://reviews.llvm.org/D20582 (authored by
Matt Arsenault) with update that only checks MD node pointer for
duplication according to review comment in that PR.

---------

Co-authored-by: Matt Arsenault <arsenm2@gmail.com>
2025-08-12 17:18:42 +08:00

14 lines
377 B
LLVM

!llvm.module.flags = !{!0}
!opencl.ocl.version = !{!1}
!opencl.spir.version = !{!1}
!opencl.used.extensions = !{!3, !4}
!opencl.used.optional.core.features = !{!5}
!llvm.ident = !{!2}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 3, i32 0}
!2 = !{!"LLVM.org clang version 20.1.0"}
!3 = !{!"cl_images", !"cl_khr_fp16"}
!4 = !{!"cl_images", !"cl_doubles"}
!5 = !{!"cl_images"}