[clang] [llvm] [LLVMABI] Add CanBeFlattened to abi::ArgInfo (PR #220558)

Akshay K via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 9 06:33:29 PDT 2026


================
@@ -71,10 +71,11 @@ class ArgInfo {
   bool ZeroExt : 1;
   bool IndirectByVal : 1;
   bool IndirectRealign : 1;
+  bool CanBeFlattened : 1;
 
   ArgInfo(Kind K = Direct)
       : TheKind(K), SignExt(false), ZeroExt(false), IndirectByVal(false),
-        IndirectRealign(false) {}
+        IndirectRealign(false), CanBeFlattened(true) {}
----------------
kumarak wrote:

Thanks @andykaylor! I’ve switched this to classic codegen. The constructor now defaults `CanBeFlattened` to false, while getDirect defaults it to true, so the effective behavior is unchanged.

I kept the setter to match classic codegen patterns where classifiers adjust CanBeFlattened after construction. 

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


More information about the cfe-commits mailing list