A quick and ugly hack to fix PR345.  I used TypeTy specifically to make
Reid cringe :)

llvm-svn: 13788
diff --git a/llvm/lib/AsmParser/llvmAsmParser.y b/llvm/lib/AsmParser/llvmAsmParser.y
index 98d79e0..a5a844b 100644
--- a/llvm/lib/AsmParser/llvmAsmParser.y
+++ b/llvm/lib/AsmParser/llvmAsmParser.y
@@ -515,7 +515,13 @@
     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.