aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore/Type.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-04-05 23:02:46 +0000
committerChris Lattner <sabre@nondot.org>2002-04-05 23:02:46 +0000
commitaf93dbcc95accfc9583aa59d19515adc5acacde7 (patch)
treebf610efbf2cb83a8e29840749d9c74a2acec589b /lib/VMCore/Type.cpp
parentee9285c1793349a1f4206bd3f3cd1adfab0942be (diff)
downloadexternal_llvm-af93dbcc95accfc9583aa59d19515adc5acacde7.zip
external_llvm-af93dbcc95accfc9583aa59d19515adc5acacde7.tar.gz
external_llvm-af93dbcc95accfc9583aa59d19515adc5acacde7.tar.bz2
* FIX: test/Regression/Assembler/2002-02-19-TypeParsing.ll
That was due to the StructType object not getting called multiple times to remove itself from the ATU list for an object, because it stopped getting queried due to this wrong test * Improve debug output when DEBUG_MERGE_TYPES is on git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2124 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Type.cpp')
-rw-r--r--lib/VMCore/Type.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp
index cd1cb44..1af616f 100644
--- a/lib/VMCore/Type.cpp
+++ b/lib/VMCore/Type.cpp
@@ -927,12 +927,12 @@ void DerivedType::typeIsRefined() {
cerr << " typeIsREFINED user " << i << "[" << ATU << "] of abstract type ["
<< (void*)this << " " << getDescription() << "]\n";
#endif
+ unsigned OldSize = AbstractTypeUsers.size();
ATU->refineAbstractType(this, this);
// If the user didn't remove itself from the list, continue...
- if (AbstractTypeUsers.size() > i && AbstractTypeUsers[i] == ATU) {
+ if (AbstractTypeUsers.size() == OldSize && AbstractTypeUsers[i] == ATU)
++i;
- }
}
--isRefining;
@@ -942,8 +942,9 @@ void DerivedType::typeIsRefined() {
for (unsigned i = 0; i < AbstractTypeUsers.size(); ++i) {
if (AbstractTypeUsers[i] != this) {
// Debugging hook
- cerr << "FOUND FAILURE\n";
+ cerr << "FOUND FAILURE\nUser: ";
AbstractTypeUsers[i]->dump();
+ cerr << "\nCatch:\n";
AbstractTypeUsers[i]->refineAbstractType(this, this);
assert(0 && "Type became concrete,"
" but it still has abstract type users hanging around!");