Fix PR147
authorChris Lattner <sabre@nondot.org>
Tue, 25 Nov 2003 03:54:16 +0000 (03:54 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 25 Nov 2003 03:54:16 +0000 (03:54 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10204 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AsmParser/llvmAsmParser.y

index ca2924bb49856c59cbade20e0446ff51ca207a42..e5018ec05afeca7f756189c671d1859de3f061f9 100644 (file)
@@ -553,6 +553,11 @@ static bool setValueName(Value *V, char *NameStr) {
         }
       }
     }
+
+    // Clear the symbol table so it doesn't complain when it
+    // gets destructed
+    CurFun.LocalSymtab.clear();
+
     ThrowException("Redefinition of value named '" + Name + "' in the '" +
                   V->getType()->getDescription() + "' type plane!");
   }