From 5821ff78efc158978019c49f1e310701c25ffd26 Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Tue, 3 Feb 2015 08:49:29 +0000 Subject: [PATCH] AST: Hoist RT->getDecl() into a variable llvm-svn: 227953 --- clang/lib/AST/ASTContext.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index 57f82ed..d480277 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -1682,10 +1682,11 @@ TypeInfo ASTContext::getTypeInfoImpl(const Type *T) const { } const RecordType *RT = cast(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(); + AlignIsRequired = RD->hasAttr(); break; } -- 2.7.4