summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2015-02-03 08:49:29 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2015-02-03 08:49:29 +0000
commit34bc82537783f693413a0346e55ec16a60c0497c (patch)
tree503c0179ccd11c3e72a38edbf3f9f353427715d7 /lib
parent98347f896369871f3baf612138e2899d9b6fe9c1 (diff)
downloadclang-34bc82537783f693413a0346e55ec16a60c0497c.tar.gz
AST: Hoist RT->getDecl() into a variable
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@227953 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/AST/ASTContext.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp
index 57f82ed7ce..d480277ed2 100644
--- a/lib/AST/ASTContext.cpp
+++ b/lib/AST/ASTContext.cpp
@@ -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;
}