* FIX: test/Regression/Assembler/2002-02-19-TypeParsing.ll
authorChris Lattner <sabre@nondot.org>
Fri, 5 Apr 2002 23:02:46 +0000 (23:02 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 5 Apr 2002 23:02:46 +0000 (23:02 +0000)
   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

lib/VMCore/Type.cpp

index cd1cb442e63a4f2d3a33fe8eb8239e551778fc5c..1af616f866373c32ada4387c0545409572ae9b8a 100644 (file)
@@ -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!");