LLVM  mainline
Functions
Terminators
Instructions

Functions in this group only apply to instructions that map to llvm::TerminatorInst instances. More...

Collaboration diagram for Terminators:

Functions

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

Detailed Description

Functions in this group only apply to instructions that map to llvm::TerminatorInst instances.


Function Documentation

Return the condition of a branch instruction.

This only works on llvm::BranchInst instructions.

See also:
llvm::BranchInst::getCondition

Definition at line 2119 of file Core.cpp.

References llvm::wrap().

Return the number of successors that this terminator has.

See also:
llvm::TerminatorInst::getNumSuccessors

Definition at line 2101 of file Core.cpp.

Return the specified successor.

See also:
llvm::TerminatorInst::getSuccessor

Definition at line 2105 of file Core.cpp.

References llvm::wrap().

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 2129 of file Core.cpp.

References llvm::wrap().

Return if a branch is conditional.

This only works on llvm::BranchInst instructions.

See also:
llvm::BranchInst::isConditional

Definition at line 2115 of file Core.cpp.

References llvm::MCID::Branch.

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 2123 of file Core.cpp.

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

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

Update the specified successor to point at the provided block.

See also:
llvm::TerminatorInst::setSuccessor

Definition at line 2109 of file Core.cpp.

References llvm::unwrap().