LLVM  8.0.1
Functions

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

Collaboration diagram for Terminators:

Functions

unsigned LLVMGetNumSuccessors (LLVMValueRef Term)
 Return the number of successors that this terminator has. More...
 
LLVMBasicBlockRef LLVMGetSuccessor (LLVMValueRef Term, unsigned i)
 Return the specified successor. More...
 
void LLVMSetSuccessor (LLVMValueRef Term, unsigned i, LLVMBasicBlockRef block)
 Update the specified successor to point at the provided block. More...
 
LLVMBool LLVMIsConditional (LLVMValueRef Branch)
 Return if a branch is conditional. More...
 
LLVMValueRef LLVMGetCondition (LLVMValueRef Branch)
 Return the condition of a branch instruction. More...
 
void LLVMSetCondition (LLVMValueRef Branch, LLVMValueRef Cond)
 Set the condition of a branch instruction. More...
 
LLVMBasicBlockRef LLVMGetSwitchDefaultDest (LLVMValueRef SwitchInstr)
 Obtain the default destination basic block of a switch instruction. More...
 

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

Definition at line 2797 of file Core.cpp.

References llvm::wrap().

◆ LLVMGetNumSuccessors()

unsigned LLVMGetNumSuccessors ( LLVMValueRef  Term)

Return the number of successors that this terminator has.

See also
llvm::Instruction::getNumSuccessors

Definition at line 2779 of file Core.cpp.

◆ LLVMGetSuccessor()

LLVMBasicBlockRef LLVMGetSuccessor ( LLVMValueRef  Term,
unsigned  i 
)

Return the specified successor.

See also
llvm::Instruction::getSuccessor

Definition at line 2783 of file Core.cpp.

References llvm::wrap().

◆ 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()

Definition at line 2807 of file Core.cpp.

References llvm::wrap().

◆ LLVMIsConditional()

LLVMBool LLVMIsConditional ( LLVMValueRef  Branch)

Return if a branch is conditional.

This only works on llvm::BranchInst instructions.

See also
llvm::BranchInst::isConditional

Definition at line 2793 of file Core.cpp.

References llvm::MCID::Branch.

◆ 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

Definition at line 2801 of file Core.cpp.

References llvm::MCID::Branch, and llvm::unwrap().

◆ LLVMSetSuccessor()

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

Update the specified successor to point at the provided block.

See also
llvm::Instruction::setSuccessor

Definition at line 2787 of file Core.cpp.

References llvm::unwrap().