forked from OSchip/llvm-project
Start at NextOffset when laying out bases as well.
llvm-svn: 82831
This commit is contained in:
parent
73b6b4e1a3
commit
7f78d85be4
|
@ -377,7 +377,7 @@ uint64_t ASTRecordLayoutBuilder::LayoutBase(const CXXRecordDecl *RD) {
|
|||
unsigned BaseAlign = BaseInfo.getNonVirtualAlign();
|
||||
|
||||
// Round up the current record size to the base's alignment boundary.
|
||||
uint64_t Offset = llvm::RoundUpToAlignment(Size, BaseAlign);
|
||||
uint64_t Offset = llvm::RoundUpToAlignment(NextOffset, BaseAlign);
|
||||
|
||||
// Try to place the base.
|
||||
while (true) {
|
||||
|
|
|
@ -62,3 +62,7 @@ struct S7 : Empty {
|
|||
void *v;
|
||||
};
|
||||
SA(11, sizeof(S7) == 8);
|
||||
|
||||
struct S8 : Empty, A {
|
||||
};
|
||||
SA(12, sizeof(S8) == 4);
|
||||
|
|
Loading…
Reference in New Issue