Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clang/include/clang/AST/APValue.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class APValue {
AddrLabelDiff
};

class LValueBase {
class alignas(uint64_t) LValueBase {
typedef llvm::PointerUnion<const ValueDecl *, const Expr *, TypeInfoLValue,
DynamicAllocLValue>
PtrTy;
Expand Down
5 changes: 3 additions & 2 deletions clang/lib/CodeGen/CodeGenFunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ class CodeGenFunction : public CodeGenTypeCache {
};

/// Header for data within LifetimeExtendedCleanupStack.
struct LifetimeExtendedCleanupHeader {
struct alignas(uint64_t) LifetimeExtendedCleanupHeader {
/// The size of the following cleanup object.
unsigned Size;
/// The kind of cleanup to push.
Expand Down Expand Up @@ -949,7 +949,8 @@ class CodeGenFunction : public CodeGenTypeCache {
LifetimeExtendedCleanupStack.size() + sizeof(Header) + Header.Size +
(Header.IsConditional ? sizeof(ActiveFlag) : 0));

static_assert(sizeof(Header) % alignof(T) == 0,
static_assert((alignof(LifetimeExtendedCleanupHeader) == alignof(T)) &&
(alignof(T) == alignof(RawAddress)),
"Cleanup will be allocated on misaligned address");
char *Buffer = &LifetimeExtendedCleanupStack[OldSize];
new (Buffer) LifetimeExtendedCleanupHeader(Header);
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/CodeGen/EHScopeStack.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class EHScopeStack {
///
/// Cleanup implementations should generally be declared in an
/// anonymous namespace.
class Cleanup {
class alignas(uint64_t) Cleanup {
// Anchor the construction vtable.
virtual void anchor();

Expand Down
Loading