================ @@ -793,6 +793,7 @@ void CodeGenModule::EmitCXXModuleInitFunc(Module *Primary) { } CodeGenFunction(*this).GenerateCXXGlobalInitFunc(Fn, ModuleInits, GuardAddr); + getTargetCodeGenInfo().setTargetAttributes(nullptr, Fn, *this); ---------------- efriedma-quic wrote:
This should be inside CreateGlobalInitOrCleanUpFunction . It looks like for functions with internal linkage, it calls SetInternalFunctionAttributes which calls a bunch of stuff. But we skip all of that for non-internal functions. Which is probably wrong. https://github.com/llvm/llvm-project/pull/133716 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits