TypeStack.pop_back(); // Remove self from stack...
- // In order to reduce the amount of repeated computation, we cache the
- // computed value for later.
return Result;
}
}
-
-
-//===----------------------------------------------------------------------===//
-// Derived Type setDerivedTypeProperties Function
-//===----------------------------------------------------------------------===//
-
// isTypeAbstract - This is a recursive function that walks a type hierarchy
// calculating whether or not a type is abstract. Worst case it will have to do
// a lot of traversing if you have some whacko opaque types, but in most cases,
}
-// setDerivedTypeProperties - This function is used to calculate the isAbstract
-// setting for a type. The getTypeProps function does all the dirty work.
-//
-void DerivedType::setDerivedTypeProperties() {
- // If the type is currently thought to be abstract, rescan all of our subtypes
- // to see if the type has just become concrete!
- if (isAbstract())
- setAbstract(isTypeAbstract());
-}
-
-
//===----------------------------------------------------------------------===//
// Type Structural Equality Testing
//===----------------------------------------------------------------------===//
if (MT && MT != this) {
refineAbstractTypeTo(MT); // Different type altogether...
} else {
- setDerivedTypeProperties(); // Update the name and isAbstract
+ // If the type is currently thought to be abstract, rescan all of our
+ // subtypes to see if the type has just become concrete!
+ if (isAbstract()) setAbstract(isTypeAbstract());
typeIsRefined(); // Same type, different contents...
}
}
if (AT && AT != this) {
refineAbstractTypeTo(AT); // Different type altogether...
} else {
- setDerivedTypeProperties(); // Update the name and isAbstract
+ // If the type is currently thought to be abstract, rescan all of our
+ // subtypes to see if the type has just become concrete!
+ if (isAbstract()) setAbstract(isTypeAbstract());
typeIsRefined(); // Same type, different contents...
}
}
if (ST && ST != this) {
refineAbstractTypeTo(ST); // Different type altogether...
} else {
- setDerivedTypeProperties(); // Update the name and isAbstract
+ // If the type is currently thought to be abstract, rescan all of our
+ // subtypes to see if the type has just become concrete!
+ if (isAbstract()) setAbstract(isTypeAbstract());
typeIsRefined(); // Same type, different contents...
}
}
if (PT && PT != this) {
refineAbstractTypeTo(PT); // Different type altogether...
} else {
- setDerivedTypeProperties(); // Update the name and isAbstract
+ // If the type is currently thought to be abstract, rescan all of our
+ // subtypes to see if the type has just become concrete!
+ if (isAbstract()) setAbstract(isTypeAbstract());
typeIsRefined(); // Same type, different contents...
}
}