================
@@ -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);
+
----------------
xakep8 wrote:
One last thing I just found:
Classic CodeGen also puts the generated initializer function into the
variable’s COMDAT, we should do the same no?
https://github.com/llvm/llvm-project/blob/0f9eb78ecd819a7929891f15c447aa6ba8ed522c/clang/lib/CodeGen/CGDeclCXX.cpp#L647
https://github.com/llvm/llvm-project/pull/228586
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits