llvm::GetIfCondition

Check whether BB is the merge point of a if-region. If so, return the branch instruction that determines which entry into BB will be taken. Also, return by references the block that will be entered from if the condition is true, and the block that will be entered if the condition is false.

Synopsis

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

CondBrInst*
GetIfCondition(
    BasicBlock* BB,
    BasicBlock*& IfTrue,
    BasicBlock*& IfFalse);

Description

This does no checking to see if the true/false blocks have large or unsavory instructions in them.

Return Value

Conditional Branch instruction.

Parameters

NameDescription
BBLLVM Basic Block Representation
IfTrueLLVM Basic Block Representation
IfFalseLLVM Basic Block Representation