Skip to content

Commit 9d2e19d

Browse files
author
git apple-llvm automerger
committed
Merge commit '080a2f89843f' from llvm.org/release/21.x into stable/21.x
2 parents d711f87 + 080a2f8 commit 9d2e19d

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

clang/include/clang/AST/APValue.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ class APValue {
219219
AddrLabelDiff
220220
};
221221

222-
class LValueBase {
222+
class alignas(uint64_t) LValueBase {
223223
typedef llvm::PointerUnion<const ValueDecl *, const Expr *, TypeInfoLValue,
224224
DynamicAllocOrForgedPtrLValue>
225225
PtrTy;

clang/lib/CodeGen/CodeGenFunction.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ class CodeGenFunction : public CodeGenTypeCache {
759759
};
760760

761761
/// Header for data within LifetimeExtendedCleanupStack.
762-
struct LifetimeExtendedCleanupHeader {
762+
struct alignas(uint64_t) LifetimeExtendedCleanupHeader {
763763
/// The size of the following cleanup object.
764764
unsigned Size;
765765
/// The kind of cleanup to push.
@@ -981,7 +981,8 @@ class CodeGenFunction : public CodeGenTypeCache {
981981
LifetimeExtendedCleanupStack.size() + sizeof(Header) + Header.Size +
982982
(Header.IsConditional ? sizeof(ActiveFlag) : 0));
983983

984-
static_assert(sizeof(Header) % alignof(T) == 0,
984+
static_assert((alignof(LifetimeExtendedCleanupHeader) == alignof(T)) &&
985+
(alignof(T) == alignof(RawAddress)),
985986
"Cleanup will be allocated on misaligned address");
986987
char *Buffer = &LifetimeExtendedCleanupStack[OldSize];
987988
new (Buffer) LifetimeExtendedCleanupHeader(Header);

clang/lib/CodeGen/EHScopeStack.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ class EHScopeStack {
143143
///
144144
/// Cleanup implementations should generally be declared in an
145145
/// anonymous namespace.
146-
class Cleanup {
146+
class alignas(uint64_t) Cleanup {
147147
// Anchor the construction vtable.
148148
virtual void anchor();
149149

0 commit comments

Comments
 (0)