This started as a small change, I swear. Unfortunately, lots of things call the...
[oota-llvm.git] / lib / Transforms / Scalar / JumpThreading.cpp
index 7b9615b109cdbfc3513424ad3a8147638b339fcb..f3536c10c5756026dbd80355f011602882aae029 100644 (file)
@@ -931,7 +931,7 @@ bool JumpThreading::ThreadEdge(BasicBlock *BB, BasicBlock *PredBB,
   // Clone the non-phi instructions of BB into NewBB, keeping track of the
   // mapping and using it to remap operands in the cloned instructions.
   for (; !isa<TerminatorInst>(BI); ++BI) {
-    Instruction *New = BI->clone();
+    Instruction *New = BI->clone(*Context);
     New->setName(BI->getNameStart());
     NewBB->getInstList().push_back(New);
     ValueMapping[BI] = New;