diff options
author | Chris Lattner <sabre@nondot.org> | 2001-11-03 03:27:53 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2001-11-03 03:27:53 +0000 |
commit | 4f1ca018aa9a835ccfcb1f77fad76370831b1065 (patch) | |
tree | a1262dd55be929eb84680d9b650f18669bdbf6b4 /llvm/lib/Bytecode | |
parent | 1e60d6b762a6c300fa740891e1afdae31db05ad9 (diff) | |
download | bcm5719-llvm-4f1ca018aa9a835ccfcb1f77fad76370831b1065.tar.gz bcm5719-llvm-4f1ca018aa9a835ccfcb1f77fad76370831b1065.zip |
Fix major bugs in type resolution
llvm-svn: 1092
Diffstat (limited to 'llvm/lib/Bytecode')
-rw-r--r-- | llvm/lib/Bytecode/Reader/ConstantReader.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/llvm/lib/Bytecode/Reader/ConstantReader.cpp b/llvm/lib/Bytecode/Reader/ConstantReader.cpp index fcf92fa5366..ec39a9f64c7 100644 --- a/llvm/lib/Bytecode/Reader/ConstantReader.cpp +++ b/llvm/lib/Bytecode/Reader/ConstantReader.cpp @@ -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. + } } |