[llvm] XCOFF associated metadata (PR #159096)
Wael Yehia via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 16 07:37:53 PDT 2025
================
@@ -8157,6 +8158,23 @@ Example:
@b = internal global i32 2, comdat $a, section "abc", !associated !0
!0 = !{ptr @a}
+XCOFF Targets
+"""""""""""""
+
+This metadata lowers to the .ref assembly directive which will add a relocation
+representing an implicit reference from the section the global belongs to, to
+the associated symbol. This link will keep the associated symbol alive if the
+section is not garbage collected. More than one associated node can be attached
+to the same global variable.
----------------
w2yehia wrote:
> More than one associated node can be attached to the same global variable.
Not sure if you checked already but does the IR Verifier allow multiple `!associated` metadata on the same global variable?
https://github.com/llvm/llvm-project/pull/159096
More information about the llvm-commits
mailing list