[llvm-commits] CVS: llvm/lib/AsmParser/llvmAsmParser.y

LLVM llvm at cs.uiuc.edu
Thu May 27 17:10:01 PDT 2004


Changes in directory llvm/lib/AsmParser:

llvmAsmParser.y updated: 1.166 -> 1.167

---
Log message:

Remove an assertion that uses Type::TypeTy that is never hit and will
break when Type::TypeTy goes away. Also remove a dead block of code and
dead comments.


---
Diffs of the changes:  (+1 -12)

Index: llvm/lib/AsmParser/llvmAsmParser.y
diff -u llvm/lib/AsmParser/llvmAsmParser.y:1.166 llvm/lib/AsmParser/llvmAsmParser.y:1.167
--- llvm/lib/AsmParser/llvmAsmParser.y:1.166	Wed May 26 16:48:31 2004
+++ llvm/lib/AsmParser/llvmAsmParser.y	Thu May 27 17:05:50 2004
@@ -377,7 +377,6 @@
 // real thing.
 //
 static Value *getVal(const Type *Ty, const ValID &D) {
-  assert(Ty != Type::TypeTy && "Should use getTypeVal for types!");
 
   // See if the value has already been defined...
   Value *V = getValNonImprovising(Ty, D);
@@ -519,17 +518,7 @@
   Value *Existing = ST.lookup(V->getType(), 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.
-    if (const Type *Ty = dyn_cast<Type>(Existing)) {
-      if (const OpaqueType *OpTy = dyn_cast<OpaqueType>(Ty)) {
-	// We ARE replacing an opaque type!
-	((OpaqueType*)OpTy)->refineAbstractTypeTo(cast<Type>(V));
-	return true;
-      }
-    }
-
-    // Otherwise, we are a simple redefinition of a value, check to see if it
+    // We are a simple redefinition of a value, check to see if it
     // is defined the same as the old one...
     if (const Type *Ty = dyn_cast<Type>(Existing)) {
       if (Ty == cast<Type>(V)) return true;  // Yes, it's equal.





More information about the llvm-commits mailing list