From cd87d1e4d1b0097877b0f9c2065900717d2aacba Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 12 Jul 2011 05:53:08 +0000 Subject: fix an unintended behavior change in the type system rewrite, which caused us to compile stuff like this: typedef struct { int x, y, z; } foo_t; foo_t g; into: %"struct." = type { i32, i32, i32 } we now get: %struct.foo_t = type { i32, i32, i32 } This doesn't change the behavior of the compiler, but makes the IR much easier to read. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134969 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenTypes.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/CodeGen/CodeGenTypes.cpp') 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 -- cgit v1.2.3