diff options
author | Anders Carlsson <andersca@mac.com> | 2010-11-24 20:22:04 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2010-11-24 20:22:04 +0000 |
commit | 2d987772c2ba3bff93b9fbe7b73bf06eed2b1607 (patch) | |
tree | bbc4117647d0dac04268a9ab1b82fc1a683ca039 /lib/CodeGen | |
parent | 4cb78b2ab6545624c8c3f80457b974c56ff8ca3b (diff) |
Revert r120110. We don't want to call ConvertType from within getCGRecordLayout.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120112 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/CodeGenTypes.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/CodeGen/CodeGenTypes.cpp b/lib/CodeGen/CodeGenTypes.cpp index 296837baf8..fdfdd9895b 100644 --- a/lib/CodeGen/CodeGenTypes.cpp +++ b/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); |