mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-18 12:29:21 +00:00
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
This commit is contained in:
parent
73b7495a96
commit
9ed0f17a62
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user