diff options
author | Chris Lattner <sabre@nondot.org> | 2007-12-10 01:51:22 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-12-10 01:51:22 +0000 |
commit | c4e330e556a2f3c76ee3c0a90d7b8e55987d3ee1 (patch) | |
tree | dae99875094c9222ce92943561b0d02777db3733 | |
parent | dd9fdcd69a9ed42df85209a379c9d6c0ed1ba38f (diff) | |
download | external_llvm-c4e330e556a2f3c76ee3c0a90d7b8e55987d3ee1.zip external_llvm-c4e330e556a2f3c76ee3c0a90d7b8e55987d3ee1.tar.gz external_llvm-c4e330e556a2f3c76ee3c0a90d7b8e55987d3ee1.tar.bz2 |
fix some warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44756 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/VMCore/Value.cpp | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/lib/VMCore/Value.cpp b/lib/VMCore/Value.cpp index be53ed2..cbedcfa 100644 --- a/lib/VMCore/Value.cpp +++ b/lib/VMCore/Value.cpp @@ -140,9 +140,9 @@ Value::~Value() CallInst::destroyThis(CI); else if (CmpInst *CI = dyn_cast<CmpInst>(this)) { - if (FCmpInst *FCI = dyn_cast<FCmpInst>(this)) + if (FCmpInst *FCI = dyn_cast<FCmpInst>(CI)) FCmpInst::destroyThis(FCI); - else if (ICmpInst *ICI = dyn_cast<ICmpInst>(this)) + else if (ICmpInst *ICI = dyn_cast<ICmpInst>(CI)) ICmpInst::destroyThis(ICI); else assert(0 && "Unknown CmpInst-inherited class in ~Value."); @@ -163,28 +163,25 @@ Value::~Value() StoreInst::destroyThis(SI); else if (TerminatorInst *TI = dyn_cast<TerminatorInst>(this)) { - if (BranchInst* BI = dyn_cast<BranchInst>(this)) + if (BranchInst* BI = dyn_cast<BranchInst>(TI)) BranchInst::destroyThis(BI); - else if (InvokeInst* II = dyn_cast<InvokeInst>(this)) + else if (InvokeInst* II = dyn_cast<InvokeInst>(TI)) InvokeInst::destroyThis(II); - else if (ReturnInst* RI = dyn_cast<ReturnInst>(this)) + else if (ReturnInst* RI = dyn_cast<ReturnInst>(TI)) ReturnInst::destroyThis(RI); - else if (SwitchInst *SI = dyn_cast<SwitchInst>(this)) + else if (SwitchInst *SI = dyn_cast<SwitchInst>(TI)) SwitchInst::destroyThis(SI); - else if (UnreachableInst *UI = dyn_cast<UnreachableInst>(this)) + else if (UnreachableInst *UI = dyn_cast<UnreachableInst>(TI)) UnreachableInst::destroyThis(UI); - else if (UnwindInst *UI = dyn_cast<UnwindInst>(this)) + else if (UnwindInst *UI = dyn_cast<UnwindInst>(TI)) UnwindInst::destroyThis(UI); else assert(0 && "Unknown TerminatorInst-inherited class in ~Value."); - } - else if(UnaryInstruction* UI = dyn_cast<UnaryInstruction>(this)) - { - if(AllocationInst* AI = dyn_cast<AllocationInst>(this)) - { - if(AllocaInst* AI = dyn_cast<AllocaInst>(this)) + } else if(UnaryInstruction* UI = dyn_cast<UnaryInstruction>(this)) { + if(AllocationInst* AI = dyn_cast<AllocationInst>(UI)) { + if(AllocaInst* AI = dyn_cast<AllocaInst>(UI)) AllocaInst::destroyThis(AI); - else if(MallocInst* MI = dyn_cast<MallocInst>(this)) + else if(MallocInst* MI = dyn_cast<MallocInst>(UI)) MallocInst::destroyThis(MI); else assert(0 && "Unknown AllocationInst-inherited class in ~Value."); |