Convert a call into an invoke and split its basic block.

Synopsis

Declared in <llvm/Transforms/Utils/Local.h>

BasicBlock*
changeToInvokeAndSplitBasicBlock(
    CallInst* CI,
    BasicBlock* UnwindEdge,
    DomTreeUpdater* DTU = nullptr);

Description

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.

Return Value

Newly split basic block following the invoke.

Parameters

Name

Description

CI

Call to convert into an invoke.

UnwindEdge

Unwind successor for the new invoke.

DTU

Optional dominator‐tree updater for CFG changes.

Created with MrDocs