Fix major bugs in type resolution

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1092 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2001-11-03 03:27:53 +00:00
parent 2d3e8bba62
commit e244a25014
5 changed files with 167 additions and 34 deletions
+8 -2
View File
@@ -103,7 +103,8 @@ const Type *BytecodeParser::parseTypeConstant(const uchar *&Buf,
//
void BytecodeParser::refineAbstractType(const DerivedType *OldType,
const Type *NewType) {
if (OldType == NewType) return; // Type is modified, but same
if (OldType == NewType &&
OldType->isAbstract()) return; // Type is modified, but same
TypeValuesListTy::iterator I = find(MethodTypeValues.begin(),
MethodTypeValues.end(), OldType);
@@ -113,7 +114,12 @@ void BytecodeParser::refineAbstractType(const DerivedType *OldType,
"Can't refine a type I don't know about!");
}
*I = NewType; // Update to point to new, more refined type.
if (OldType == NewType) {
assert(!OldType->isAbstract());
I->removeUserFromConcrete();
} else {
*I = NewType; // Update to point to new, more refined type.
}
}