[clang] [ARM, AArch64] Fix passing of structures with aligned base classes (PR #135564)

Harald van Dijk via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 16 03:10:58 PDT 2025


================
@@ -1302,6 +1302,7 @@ ItaniumRecordLayoutBuilder::LayoutBase(const BaseSubobjectInfo *Base) {
     setSize(std::max(getSize(), Offset + Layout.getSize()));
 
   // Remember max struct/class alignment.
+  UnadjustedAlignment = std::max(UnadjustedAlignment, PreferredBaseAlign);
----------------
hvdijk wrote:

Done, I've moved the relevant tests from `aapcs64-align.cpp` to `AArch64/args.cpp`. It required small changes because the former tests with `-O2`, the latter without, but nothing that impacts what is being tested.

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


More information about the cfe-commits mailing list