mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01: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. llvm-svn: 13861
This commit is contained in:
parent
0030dfe486
commit
3077b8e168
@ -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