[PATCH] D46013: [ARM] Conform to AAPCS when passing overaligned composites as arguments

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 23 16:57:04 PDT 2018


efriedma added inline comments.


================
Comment at: lib/AST/ASTContext.cpp:2088
+  default:
+    UnadjustedAlign = getTypeAlign(T);
+  }
----------------
This "default" isn't right; there are a lot of non-canonical types which need to be handled here (which getTypeAlign handles, but this doesn't).

Could you just write something like `if (const auto *RTy = T->getAs<RecordType>()) [...] else return getTypeAlign(T);`?


https://reviews.llvm.org/D46013





More information about the cfe-commits mailing list