mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-03 19:32:35 +00:00
AST: Hoist RT->getDecl() into a variable
llvm-svn: 227953
This commit is contained in:
parent
991b5966a3
commit
5821ff78ef
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user