inline const TypeClass *containsEquivalent(const TypeClass *Ty) {
for (typename MapTy::iterator I = Map.begin(), E = Map.end(); I != E; ++I)
if (I->second.get() != Ty && TypesEqual(Ty, I->second.get()))
- return (TypeClass*)I->second.get(); // FIXME TODO when types not const
+ return (TypeClass*)I->second.get();
return 0;
}
ParamTys[i] = NewType;
}
- const FunctionType *MT = FunctionTypes.containsEquivalent(this);
- if (MT && MT != this) {
+ if (const FunctionType *MT = FunctionTypes.containsEquivalent(this)) {
refineAbstractTypeTo(MT); // Different type altogether...
} else {
// If the type is currently thought to be abstract, rescan all of our
ElementType.removeUserFromConcrete();
ElementType = NewType;
- const ArrayType *AT = ArrayTypes.containsEquivalent(this);
- if (AT && AT != this) {
+ if (const ArrayType *AT = ArrayTypes.containsEquivalent(this)) {
refineAbstractTypeTo(AT); // Different type altogether...
} else {
// If the type is currently thought to be abstract, rescan all of our
ETypes[i] = NewType;
}
- const StructType *ST = StructTypes.containsEquivalent(this);
- if (ST && ST != this) {
+ if (const StructType *ST = StructTypes.containsEquivalent(this)) {
refineAbstractTypeTo(ST); // Different type altogether...
} else {
// If the type is currently thought to be abstract, rescan all of our
ElementType.removeUserFromConcrete();
ElementType = NewType;
- const PointerType *PT = PointerTypes.containsEquivalent(this);
- if (PT && PT != this) {
+ if (const PointerType *PT = PointerTypes.containsEquivalent(this)) {
refineAbstractTypeTo(PT); // Different type altogether...
} else {
// If the type is currently thought to be abstract, rescan all of our