From: Reid Spencer Date: Thu, 27 May 2004 22:05:50 +0000 (+0000) Subject: Remove an assertion that uses Type::TypeTy that is never hit and will X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=9ed0f17a62ea446b86a4c22a38127c5912b96e95;p=oota-llvm.git 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13861 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y index dfdb398f44a..27464acfe24 100644 --- a/lib/AsmParser/llvmAsmParser.y +++ b/lib/AsmParser/llvmAsmParser.y @@ -377,7 +377,6 @@ static Value *getValNonImprovising(const Type *Ty, const ValID &D) { // 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 @@ static bool setValueName(Value *V, char *NameStr) { 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(Existing)) { - if (const OpaqueType *OpTy = dyn_cast(Ty)) { - // We ARE replacing an opaque type! - ((OpaqueType*)OpTy)->refineAbstractTypeTo(cast(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(Existing)) { if (Ty == cast(V)) return true; // Yes, it's equal.