Skip to content
Snippets Groups Projects
Commit 449bbc5b authored by Anders Carlsson's avatar Anders Carlsson
Browse files

Use ConvertType instead of ConvertTagDeclType, since ConvertType will assign a name to the type.

llvm-svn: 120110
parent 6277615c
No related branches found
No related tags found
No related merge requests found
...@@ -486,12 +486,14 @@ const llvm::Type *CodeGenTypes::ConvertTagDeclType(const TagDecl *TD) { ...@@ -486,12 +486,14 @@ const llvm::Type *CodeGenTypes::ConvertTagDeclType(const TagDecl *TD) {
/// getCGRecordLayout - Return record layout info for the given llvm::Type. /// getCGRecordLayout - Return record layout info for the given llvm::Type.
const CGRecordLayout & const CGRecordLayout &
CodeGenTypes::getCGRecordLayout(const RecordDecl *TD) { 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); const CGRecordLayout *Layout = CGRecordLayouts.lookup(Key);
if (!Layout) { if (!Layout) {
// Compute the type information. // Compute the type information. We use ConvertType here so that we'll
ConvertTagDeclType(TD); // get a name for the type.
ConvertType(T);
// Now try again. // Now try again.
Layout = CGRecordLayouts.lookup(Key); Layout = CGRecordLayouts.lookup(Key);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment