[clang] [llvm] [clang/LLVM] Add flatten_deep attribute for depth-limited inlining (1/2) (PR #165777)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 17 06:21:50 PST 2025


================
@@ -2751,6 +2751,13 @@ void CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D,
       B.addAttribute("aarch64_new_zt0");
   }
 
+  // Handle flatten_depth attribute for depth-based inlining
+  if (const FlattenDepthAttr *FDA = D->getAttr<FlattenDepthAttr>()) {
+    // Add the flatten_depth attribute with the max depth value as a typed int
----------------
erichkeane wrote:

Move the comment outside of the 'if', and remove the curley braces.  The two variants of the comment are redundant anyway.

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


More information about the cfe-commits mailing list