[all-commits] [llvm/llvm-project] bd5883: [clang] Fix record alignment lost via external lay...
Daniel Paoliello via All-commits
all-commits at lists.llvm.org
Mon Jul 27 15:55:45 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: bd5883c35f43b01ab96bbdba1bc14a81f78694ea
https://github.com/llvm/llvm-project/commit/bd5883c35f43b01ab96bbdba1bc14a81f78694ea
Author: Daniel Paoliello <danpao at microsoft.com>
Date: 2026-07-27 (Mon, 27 Jul 2026)
Changed paths:
M clang/lib/AST/RecordLayoutBuilder.cpp
A clang/test/CodeGenCXX/Inputs/override-layout-aligned-base.layout
A clang/test/CodeGenCXX/override-layout-aligned-base.cpp
Log Message:
-----------
[clang] Fix record alignment lost via external layout on Arm64 (#212362)
An external layout source (such as LLDB reading DWARF) supplies a
record's final alignment directly, since `alignas` / `__declspec(align)`
attributes are not recoverable from debug info. `finalizeLayout`
captured `NonRequiredAlignment` before applying the external alignment,
so an externally laid out record published a stale, too-small value.
On Arm64 this field is used to fold a base's alignment into the derived
record, so a derived class picked up the stale value instead of the
base's actual alignment. This regressed
`lldb/test/API/lang/cpp/alignas_base_class` when #210461 was merged,
where `alignof(Derived)` evaluated to 1 instead of 8. Other targets were
unaffected as they do not read this field.
Treat all of an externally supplied alignment as non-required, as there
is no way to tell how much of it was imposed by an alignment attribute.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list