================
@@ -3105,6 +3105,12 @@ void 
CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D,
   if (CodeGenOpts.DisableOutlining || D->hasAttr<NoOutlineAttr>())
     B.addAttribute(llvm::Attribute::NoOutline);
 
+  if (D->hasAttr<NoIPAAttr>()) {
+    B.addAttribute(llvm::Attribute::NoIPA);
+    if (!F->hasFnAttribute(llvm::Attribute::AlwaysInline))
----------------
AaronBallman wrote:

hmmm should we instead be adding the `NoInlineAttr` at the AST level? e.g., 
would someone using an AST matcher expect to see the noinline? I suspect so 
because the semantics are in effect, so things like clang-tidy checks that want 
to recommend inlining for whatever reason won't see that the function is marked 
as noinline in a roundabout way.

https://github.com/llvm/llvm-project/pull/207502
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to