projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
991b596
)
AST: Hoist RT->getDecl() into a variable
author
David Majnemer
<david.majnemer@gmail.com>
Tue, 3 Feb 2015 08:49:29 +0000
(08:49 +0000)
committer
David Majnemer
<david.majnemer@gmail.com>
Tue, 3 Feb 2015 08:49:29 +0000
(08:49 +0000)
llvm-svn: 227953
clang/lib/AST/ASTContext.cpp
patch
|
blob
|
history
diff --git
a/clang/lib/AST/ASTContext.cpp
b/clang/lib/AST/ASTContext.cpp
index
57f82ed
..
d480277
100644
(file)
--- 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<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 = R
T->getDecl()
->hasAttr<AlignedAttr>();
+ AlignIsRequired = R
D
->hasAttr<AlignedAttr>();
break;
}