summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2010-11-24 20:22:04 +0000
committerAnders Carlsson <andersca@mac.com>2010-11-24 20:22:04 +0000
commit0e4dfebe6300d06aff9f60a1be8c0120a2b2e11c (patch)
treed2bdf42ebb147f3e4455a31ecb60e1422c10ec29
parent26f628d57f540450c9b10ba8f818a4af96cfd805 (diff)
downloadbcm5719-llvm-0e4dfebe6300d06aff9f60a1be8c0120a2b2e11c.tar.gz
bcm5719-llvm-0e4dfebe6300d06aff9f60a1be8c0120a2b2e11c.zip
Revert r120110. We don't want to call ConvertType from within getCGRecordLayout.
llvm-svn: 120112
-rw-r--r--clang/lib/CodeGen/CodeGenTypes.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/clang/lib/CodeGen/CodeGenTypes.cpp b/clang/lib/CodeGen/CodeGenTypes.cpp
index 296837baf84..fdfdd9895b8 100644
--- a/clang/lib/CodeGen/CodeGenTypes.cpp
+++ b/clang/lib/CodeGen/CodeGenTypes.cpp
@@ -483,17 +483,15 @@ const llvm::Type *CodeGenTypes::ConvertTagDeclType(const TagDecl *TD) {
return ResultHolder.get();
}
-/// getCGRecordLayout - Return record layout info for the given llvm::Type.
+/// getCGRecordLayout - Return record layout info for the given record decl.
const CGRecordLayout &
-CodeGenTypes::getCGRecordLayout(const RecordDecl *TD) {
- QualType T = Context.getTagDeclType(TD);
- const Type *Key = T.getTypePtr();
+CodeGenTypes::getCGRecordLayout(const RecordDecl *RD) {
+ const Type *Key = Context.getTagDeclType(RD).getTypePtr();
const CGRecordLayout *Layout = CGRecordLayouts.lookup(Key);
if (!Layout) {
- // Compute the type information. We use ConvertType here so that we'll
- // get a name for the type.
- ConvertType(T);
+ // Compute the type information.
+ ConvertTagDeclType(RD);
// Now try again.
Layout = CGRecordLayouts.lookup(Key);
OpenPOWER on IntegriCloud