Convert a call into an invoke and split its basic block.
Declared in <llvm/Transforms/Utils/Local.h>
BasicBlock*
changeToInvokeAndSplitBasicBlock(
CallInst* CI,
BasicBlock* UnwindEdge,
DomTreeUpdater* DTU = nullptr);
Convert the CallInst to InvokeInst with the specified unwind edge basic block. This also splits the basic block where CI is located, because InvokeInst is a terminator instruction. Returns the newly split basic block.
Newly split basic block following the invoke.
| Name | Description |
|---|---|
| CI | Call to convert into an invoke. |
| UnwindEdge | Unwind successor for the new invoke. |
| DTU | Optional dominator-tree updater for CFG changes. |