[clang] [CIR] Fix 'vague' linkage globals. (PR #228586)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 7 08:50:20 PDT 2026
================
@@ -215,6 +221,10 @@ struct LoweringPreparePass
cir::IntType guardTy,
cir::GlobalLinkageKind linkage);
+ /// Append 'global' to the module's llvm.used list to make sure it doesn't get
+ /// garbage-collected by the linker.
+ void addUsedGlobal(cir::GlobalOp global);
+
----------------
erichkeane wrote:
Hmm... interesting, good catch, thanks! I didn't spot that when messing around with github.
https://github.com/llvm/llvm-project/pull/228586
More information about the cfe-commits
mailing list