aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-05-27 22:05:50 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-05-27 22:05:50 +0000
commit9ed0f17a62ea446b86a4c22a38127c5912b96e95 (patch)
tree3daba60c757bad43a3a5738c2366a18c6a62c3c7
parent73b7495a96e21e1515df86414e0636dbf1395fc5 (diff)
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
-rw-r--r--lib/AsmParser/llvmAsmParser.y13
1 files changed, 1 insertions, 12 deletions
diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y
index dfdb398f44..27464acfe2 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<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.