[clang] [LLVM] Add new attribute `optdebug` to optimize for debugging (PR #66632)

Paul T Robinson via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 18 06:08:14 PDT 2023


================
@@ -2325,6 +2325,7 @@ void CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D,
       B.addAttribute(llvm::Attribute::Naked);
 
     // OptimizeNone wins over OptimizeForSize and MinSize.
+    F->removeFnAttr(llvm::Attribute::OptimizeForDebugging);
----------------
pogo59 wrote:

Given that this patch doesn't have any other clang changes, this one can be deferred to a later patch where clang actually applies the attribute.

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


More information about the cfe-commits mailing list