diff options
| author | Anders Carlsson <andersca@mac.com> | 2010-11-24 20:05:21 +0000 |
|---|---|---|
| committer | Anders Carlsson <andersca@mac.com> | 2010-11-24 20:05:21 +0000 |
| commit | 449bbc5bde50449f185852c0d5b8949e93234248 (patch) | |
| tree | f99ace4d33e2a67bfa472cfcbe2bc0d26f924c3e /clang/lib/CodeGen | |
| parent | 6277615cbb1cda917dd8815a611fa1146e172af9 (diff) | |
| download | bcm5719-llvm-449bbc5bde50449f185852c0d5b8949e93234248.tar.gz bcm5719-llvm-449bbc5bde50449f185852c0d5b8949e93234248.zip | |
Use ConvertType instead of ConvertTagDeclType, since ConvertType will assign a name to the type.
llvm-svn: 120110
Diffstat (limited to 'clang/lib/CodeGen')
| -rw-r--r-- | clang/lib/CodeGen/CodeGenTypes.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CodeGenTypes.cpp b/clang/lib/CodeGen/CodeGenTypes.cpp index fb1a6d8f13d..296837baf84 100644 --- a/clang/lib/CodeGen/CodeGenTypes.cpp +++ b/clang/lib/CodeGen/CodeGenTypes.cpp @@ -486,12 +486,14 @@ const llvm::Type *CodeGenTypes::ConvertTagDeclType(const TagDecl *TD) { /// getCGRecordLayout - Return record layout info for the given llvm::Type. const CGRecordLayout & CodeGenTypes::getCGRecordLayout(const RecordDecl *TD) { - const Type *Key = Context.getTagDeclType(TD).getTypePtr(); + QualType T = Context.getTagDeclType(TD); + const Type *Key = T.getTypePtr(); const CGRecordLayout *Layout = CGRecordLayouts.lookup(Key); if (!Layout) { - // Compute the type information. - ConvertTagDeclType(TD); + // Compute the type information. We use ConvertType here so that we'll + // get a name for the type. + ConvertType(T); // Now try again. Layout = CGRecordLayouts.lookup(Key); |

