aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/CodeGenTypes.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/CodeGenTypes.cpp b/lib/CodeGen/CodeGenTypes.cpp
index 84b9fba5fd..64348ea7d1 100644
--- a/lib/CodeGen/CodeGenTypes.cpp
+++ b/lib/CodeGen/CodeGenTypes.cpp
@@ -451,10 +451,10 @@ llvm::StructType *CodeGenTypes::ConvertRecordDeclType(const RecordDecl *RD) {
llvm::StructType *&Entry = RecordDeclTypes[Key];
// If we don't have a StructType at all yet, create the forward declaration.
- if (Entry == 0)
- Entry = llvm::StructType::createNamed(getLLVMContext(),
- std::string(RD->getKindName()) + "." +
- RD->getQualifiedNameAsString());
+ if (Entry == 0) {
+ Entry = llvm::StructType::createNamed(getLLVMContext(), "");
+ addRecordTypeName(RD, Entry, "");
+ }
llvm::StructType *Ty = Entry;
// If this is still a forward declaration, or the LLVM type is already