Project Alice
Loading...
Searching...
No Matches
Collaboration diagram for Terminators:

Functions

unsigned LLVMGetNumSuccessors (LLVMValueRef Term)
 
LLVMBasicBlockRef LLVMGetSuccessor (LLVMValueRef Term, unsigned i)
 
void LLVMSetSuccessor (LLVMValueRef Term, unsigned i, LLVMBasicBlockRef block)
 
LLVMBool LLVMIsConditional (LLVMValueRef Branch)
 
LLVMValueRef LLVMGetCondition (LLVMValueRef Branch)
 
void LLVMSetCondition (LLVMValueRef Branch, LLVMValueRef Cond)
 
LLVMBasicBlockRef LLVMGetSwitchDefaultDest (LLVMValueRef SwitchInstr)
 

Detailed Description

Functions in this group only apply to instructions for which LLVMIsATerminatorInst returns true.

Function Documentation

◆ LLVMGetCondition()

LLVMValueRef LLVMGetCondition ( LLVMValueRef  Branch)

Return the condition of a branch instruction.

This only works on llvm::BranchInst instructions.

See also
llvm::BranchInst::getCondition

◆ LLVMGetNumSuccessors()

unsigned LLVMGetNumSuccessors ( LLVMValueRef  Term)

Return the number of successors that this terminator has.

See also
llvm::Instruction::getNumSuccessors

◆ LLVMGetSuccessor()

LLVMBasicBlockRef LLVMGetSuccessor ( LLVMValueRef  Term,
unsigned  i 
)

Return the specified successor.

See also
llvm::Instruction::getSuccessor

◆ LLVMGetSwitchDefaultDest()

LLVMBasicBlockRef LLVMGetSwitchDefaultDest ( LLVMValueRef  SwitchInstr)

Obtain the default destination basic block of a switch instruction.

This only works on llvm::SwitchInst instructions.

See also
llvm::SwitchInst::getDefaultDest()

◆ LLVMIsConditional()

LLVMBool LLVMIsConditional ( LLVMValueRef  Branch)

Return if a branch is conditional.

This only works on llvm::BranchInst instructions.

See also
llvm::BranchInst::isConditional

◆ LLVMSetCondition()

void LLVMSetCondition ( LLVMValueRef  Branch,
LLVMValueRef  Cond 
)

Set the condition of a branch instruction.

This only works on llvm::BranchInst instructions.

See also
llvm::BranchInst::setCondition

◆ LLVMSetSuccessor()

void LLVMSetSuccessor ( LLVMValueRef  Term,
unsigned  i,
LLVMBasicBlockRef  block 
)

Update the specified successor to point at the provided block.

See also
llvm::Instruction::setSuccessor