// 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;