// Anything that used the value produced by the invoke instruction
// now uses the value produced by the call instruction.
II->replaceAllUsesWith(Call);
// Anything that used the value produced by the invoke instruction
// now uses the value produced by the call instruction.
II->replaceAllUsesWith(Call);
+ II->getExceptionalDest()->removePredecessor(II->getParent());
// Insert a branch to the normal destination right before the
// invoke.
new BranchInst(II->getNormalDest(), II);
// Finally, delete the invoke instruction!
// Insert a branch to the normal destination right before the
// invoke.
new BranchInst(II->getNormalDest(), II);
// Finally, delete the invoke instruction!
I->getInstList().pop_back();
++NumRemoved;
I->getInstList().pop_back();
++NumRemoved;