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 | 02d429d1dba1c990cdbda3dd69eba2a0f5cb8a4a (patch) | |
tree | b8fae27489608ce139903a01015e437718a3b7fc /lib/VMCore/Value.cpp | |
parent | ef308f8210dc4317f91b2f9e6cfea274054ff3e6 (diff) | |
download | external_llvm-02d429d1dba1c990cdbda3dd69eba2a0f5cb8a4a.zip external_llvm-02d429d1dba1c990cdbda3dd69eba2a0f5cb8a4a.tar.gz external_llvm-02d429d1dba1c990cdbda3dd69eba2a0f5cb8a4a.tar.bz2 |
Check in fix for bug: test/Regression/Assembler/ValueRefineAbsType.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1582 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Value.cpp')
-rw-r--r-- | lib/VMCore/Value.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/VMCore/Value.cpp b/lib/VMCore/Value.cpp index af9d2e4..c4327a1 100644 --- a/lib/VMCore/Value.cpp +++ b/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; } |