forked from OSchip/llvm-project
parent
1216b05d3d
commit
e1f10511ba
|
@ -33,8 +33,7 @@ class ASTRecordLayout {
|
|||
uint64_t *FieldOffsets;
|
||||
friend class ASTContext;
|
||||
|
||||
ASTRecordLayout(uint64_t S = 0, unsigned A = 8)
|
||||
: Size(S), Alignment(A) {}
|
||||
ASTRecordLayout() : Size(0), Alignment(8) {}
|
||||
~ASTRecordLayout() {
|
||||
delete [] FieldOffsets;
|
||||
}
|
||||
|
|
|
@ -405,15 +405,7 @@ ASTContext::getASTObjCInterfaceLayout(const ObjCInterfaceDecl *D) {
|
|||
|
||||
// Allocate and assign into ASTRecordLayouts here. The "Entry" reference can
|
||||
// be invalidated (dangle) if the ASTRecordLayouts hashtable is inserted into.
|
||||
unsigned Alignment = 8;
|
||||
uint64_t Size = 0;
|
||||
if (ObjCInterfaceDecl *SD = D->getSuperClass()) {
|
||||
const ASTRecordLayout &SL = getASTObjCInterfaceLayout(SD);
|
||||
Alignment = SL.getAlignment();
|
||||
Size = SL.getSize();
|
||||
}
|
||||
ASTRecordLayout *NewEntry = new ASTRecordLayout(Size, Alignment);
|
||||
|
||||
ASTRecordLayout *NewEntry = new ASTRecordLayout();
|
||||
Entry = NewEntry;
|
||||
|
||||
NewEntry->InitializeLayout(D->ivar_size());
|
||||
|
|
Loading…
Reference in New Issue