Don't call Type::setName()
authorChris Lattner <sabre@nondot.org>
Fri, 9 Jul 2004 16:43:55 +0000 (16:43 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 9 Jul 2004 16:43:55 +0000 (16:43 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14724 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AsmParser/llvmAsmParser.y

index dbb4546b4f3d00062e59cba52bc45c3ae2c51df6..b2f901f206e965d788d56044058ea76a16820169 100644 (file)
@@ -610,7 +610,7 @@ static bool setTypeName(Type *T, char *NameStr) {
   }
 
   // Okay, its a newly named type. Set its name.
-  T->setName(Name,&ST);
+  if (!Name.empty()) ST.insert(Name, T);
 
   // If we're in function scope
   if (inFunctionScope()) {