diff options
| author | Chris Lattner <sabre@nondot.org> | 2002-01-25 03:45:27 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2002-01-25 03:45:27 +0000 |
| commit | 67e5c29ae4b11d4566eedae6bcbbe840cecc0e67 (patch) | |
| tree | 3d3f29d3ba7444595ec9493a59a5ba258e53f3f7 /llvm/lib | |
| parent | 5feb5675dc2706a89140b41095f7863ec249d718 (diff) | |
| download | bcm5719-llvm-67e5c29ae4b11d4566eedae6bcbbe840cecc0e67.tar.gz bcm5719-llvm-67e5c29ae4b11d4566eedae6bcbbe840cecc0e67.zip | |
Check in fix for bug: test/Regression/Assembler/ValueRefineAbsType.ll
llvm-svn: 1582
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/VMCore/Value.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/VMCore/Value.cpp b/llvm/lib/VMCore/Value.cpp index af9d2e4f628..c4327a1814d 100644 --- a/llvm/lib/VMCore/Value.cpp +++ b/llvm/lib/VMCore/Value.cpp @@ -8,7 +8,7 @@ #include "llvm/InstrTypes.h" #include "llvm/SymbolTable.h" #include "llvm/SymTabValue.h" -#include "llvm/Type.h" +#include "llvm/DerivedTypes.h" #ifndef NDEBUG // Only in -g mode... #include "llvm/Assembly/Writer.h" #include <iostream> @@ -71,7 +71,9 @@ void Value::replaceAllUsesWith(Value *D) { // change Ty to point to the right type. :) // void Value::refineAbstractType(const DerivedType *OldTy, const Type *NewTy) { - assert(Ty.get() == (const Type*)OldTy &&"Can't refine anything but my type!"); + assert(Ty.get() == OldTy &&"Can't refine anything but my type!"); + if (OldTy == NewTy && !OldTy->isAbstract()) + Ty.removeUserFromConcrete(); Ty = NewTy; } |

