From: Chris Lattner Date: Fri, 5 Apr 2002 23:02:46 +0000 (+0000) Subject: * FIX: test/Regression/Assembler/2002-02-19-TypeParsing.ll X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=af93dbcc95accfc9583aa59d19515adc5acacde7;p=oota-llvm.git * 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 --- diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp index cd1cb442e63..1af616f8663 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!");