Push LLVMContexts through the IntegerType APIs.
[oota-llvm.git] / lib / Transforms / Scalar / SimplifyCFGPass.cpp
index 3ea6ddd67c2d8e705a4ed5d35da612acbac3e25a..5de79c49cfbf390580636bf6c81a45564ccb4bb5 100644 (file)
@@ -65,7 +65,7 @@ static void ChangeToUnreachable(Instruction *I, LLVMContext &Context) {
   for (succ_iterator SI = succ_begin(BB), SE = succ_end(BB); SI != SE; ++SI)
     (*SI)->removePredecessor(BB);
   
-  new UnreachableInst(I);
+  new UnreachableInst(I->getContext(), I);
   
   // All instructions after this are dead.
   BasicBlock::iterator BBI = I, BBE = BB->end();