summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/AsmParser/llvmAsmParser.y8
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/lib/AsmParser/llvmAsmParser.y b/llvm/lib/AsmParser/llvmAsmParser.y
index 98d79e01c9d..a5a844b1d8e 100644
--- a/llvm/lib/AsmParser/llvmAsmParser.y
+++ b/llvm/lib/AsmParser/llvmAsmParser.y
@@ -515,7 +515,13 @@ static bool setValueName(Value *V, char *NameStr) {
CurFun.CurrentFunction->getSymbolTable() :
CurModule.CurrentModule->getSymbolTable();
- Value *Existing = ST.lookup(V->getType(), Name);
+ Value *Existing;
+ // FIXME: this is really gross
+ if (V->getType() != Type::TypeTy)
+ Existing = ST.lookup(V->getType(), Name);
+ else
+ Existing = ST.lookupType(Name);
+
if (Existing) { // Inserting a name that is already defined???
// There is only one case where this is allowed: when we are refining an
// opaque type. In this case, Existing will be an opaque type.
OpenPOWER on IntegriCloud