mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-20 16:17:38 +00:00
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:
@@ -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.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user