[llvm-commits] CVS: llvm/lib/VMCore/Type.cpp
Chris Lattner
lattner at cs.uiuc.edu
Thu Sep 4 18:44:04 PDT 2003
Changes in directory llvm/lib/VMCore:
Type.cpp updated: 1.61 -> 1.62
---
Log message:
Inline method
---
Diffs of the changes:
Index: llvm/lib/VMCore/Type.cpp
diff -u llvm/lib/VMCore/Type.cpp:1.61 llvm/lib/VMCore/Type.cpp:1.62
--- llvm/lib/VMCore/Type.cpp:1.61 Thu Sep 4 18:41:03 2003
+++ llvm/lib/VMCore/Type.cpp Thu Sep 4 18:43:40 2003
@@ -209,8 +209,6 @@
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;
}
@@ -384,12 +382,6 @@
}
-
-
-//===----------------------------------------------------------------------===//
-// 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,
@@ -425,17 +417,6 @@
}
-// 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
//===----------------------------------------------------------------------===//
@@ -1089,7 +1070,9 @@
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...
}
}
@@ -1115,7 +1098,9 @@
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...
}
}
@@ -1144,7 +1129,9 @@
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...
}
}
@@ -1169,7 +1156,9 @@
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...
}
}
More information about the llvm-commits
mailing list