// If the old instruction was an invoke, add an unconditional branch
// before the invoke, which will become the new terminator.
if (InvokeInst *II = dyn_cast<InvokeInst>(I))
- new BranchInst(II->getNormalDest(), I);
+ BranchInst::Create(II->getNormalDest(), I);
// Delete the old call site
MI->getParent()->getInstList().erase(I);
// If the old instruction was an invoke, add an unconditional branch
// before the invoke, which will become the new terminator.
if (InvokeInst *II = dyn_cast<InvokeInst>(I))
- new BranchInst(II->getNormalDest(), I);
+ BranchInst::Create(II->getNormalDest(), I);
// Delete the old call site
if (I->getType() != Type::VoidTy)