[clang] [clang] Add use-sample-profile attribute to thread-local wrapper (PR #245514)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 27 10:04:50 PST 2026


================
@@ -4185,6 +4185,8 @@ MicrosoftCXXABI::getAddrOfCXXCtorClosure(const CXXConstructorDecl *CD,
     ThunkFn->setComdat(CGM.getModule().getOrInsertComdat(ThunkFn->getName()));
   bool IsCopy = CT == Ctor_CopyingClosure;
 
+  CGM.SetLLVMFunctionAttributesForDefinition(CD, ThunkFn);
----------------
efriedma-quic wrote:

I think we also need to call SetLLVMFunctionAttributes() and setNonAliasAttributes()

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


More information about the cfe-commits mailing list