X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FVMCore%2FiSwitch.cpp;h=a63adfdfcfd289ec712457d26ecf82286e7777f6;hb=2c08dcc276e218193beffbddf2a30f4d88e8af58;hp=91edbc0dce298a3f313fdde9805ff07f92dab273;hpb=e9bb2df410f7a22decad9a883f7139d5857c1520;p=oota-llvm.git diff --git a/lib/VMCore/iSwitch.cpp b/lib/VMCore/iSwitch.cpp index 91edbc0dce2..a63adfdfcfd 100644 --- a/lib/VMCore/iSwitch.cpp +++ b/lib/VMCore/iSwitch.cpp @@ -6,15 +6,13 @@ #include "llvm/iTerminators.h" #include "llvm/BasicBlock.h" -#ifndef NDEBUG -#include "llvm/Type.h" -#endif -SwitchInst::SwitchInst(Value *V, BasicBlock *DefDest) - : TerminatorInst(Instruction::Switch) { - assert(V && DefDest); +SwitchInst::SwitchInst(Value *V, BasicBlock *DefaultDest, + Instruction *InsertBefore) + : TerminatorInst(Instruction::Switch, InsertBefore) { + assert(V && DefaultDest); Operands.push_back(Use(V, this)); - Operands.push_back(Use(DefDest, this)); + Operands.push_back(Use(DefaultDest, this)); } SwitchInst::SwitchInst(const SwitchInst &SI) @@ -28,6 +26,6 @@ SwitchInst::SwitchInst(const SwitchInst &SI) } void SwitchInst::dest_push_back(Constant *OnVal, BasicBlock *Dest) { - Operands.push_back(Use(OnVal, this)); - Operands.push_back(Use(Dest, this)); + Operands.push_back(Use((Value*)OnVal, this)); + Operands.push_back(Use((Value*)Dest, this)); }