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

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 14 13:40:16 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);
----------------
efriedma-quic wrote:

I'm pretty sure Darwin triples opted out of the whole composite alignment thing in 20208cc046c206a1436edb714e94bd52a0bc8572 , so this shouldn't have any effect there.  And... I guess we opted-out Windows too; not sure if that was intentional, since it wasn't discussed at the time, but it seems to match MSVC, so I guess that's fine.

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


More information about the cfe-commits mailing list