[clang] Mark CXX module initializer with PACBTI attributes (PR #133716)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 7 10:59:50 PDT 2025


================
@@ -447,6 +447,8 @@ llvm::Function *CodeGenModule::CreateGlobalInitOrCleanUpFunction(
 
   if (Linkage == llvm::GlobalVariable::InternalLinkage)
     SetInternalFunctionAttributes(GlobalDecl(), Fn, FI);
+  else
+    getTargetCodeGenInfo().setTargetAttributes(nullptr, Fn, *this);
----------------
efriedma-quic wrote:

Do we also need to call SetLLVMFunctionAttributes/SetLLVMFunctionAttributesForDefinition here?

https://github.com/llvm/llvm-project/pull/133716


More information about the cfe-commits mailing list