AST: Hoist RT->getDecl() into a variable

llvm-svn: 227953
This commit is contained in:
David Majnemer 2015-02-03 08:49:29 +00:00
parent 991b5966a3
commit 5821ff78ef

View File

@ -1682,10 +1682,11 @@ TypeInfo ASTContext::getTypeInfoImpl(const Type *T) const {
}
const RecordType *RT = cast<RecordType>(TT);
const ASTRecordLayout &Layout = getASTRecordLayout(RT->getDecl());
const RecordDecl *RD = RT->getDecl();
const ASTRecordLayout &Layout = getASTRecordLayout(RD);
Width = toBits(Layout.getSize());
Align = toBits(Layout.getAlignment());
AlignIsRequired = RT->getDecl()->hasAttr<AlignedAttr>();
AlignIsRequired = RD->hasAttr<AlignedAttr>();
break;
}