Eliminate the concept of a deferred symbol table. The optimization really isn't,
[oota-llvm.git] / lib / VMCore / iSwitch.cpp
index 91edbc0dce298a3f313fdde9805ff07f92dab273..a63adfdfcfd289ec712457d26ecf82286e7777f6 100644 (file)
@@ -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));
 }