diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y index ca2924bb498..e5018ec05af 100644 --- a/lib/AsmParser/llvmAsmParser.y +++ b/lib/AsmParser/llvmAsmParser.y @@ -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!"); }