LLVM API Documentation

Public Member Functions | Static Public Member Functions | Protected Member Functions
llvm::TerminatorInst Class Reference

#include <InstrTypes.h>

Inheritance diagram for llvm::TerminatorInst:
Inheritance graph
[legend]
Collaboration diagram for llvm::TerminatorInst:
Collaboration graph
[legend]

List of all members.

Public Member Functions

unsigned getNumSuccessors () const
 Return the number of successors that this terminator has.
BasicBlockgetSuccessor (unsigned idx) const
 Return the specified successor.
void setSuccessor (unsigned idx, BasicBlock *B)
 Update the specified successor to point at the provided block.

Static Public Member Functions

static bool classof (const Instruction *I)
static bool classof (const Value *V)
 Methods for support type inquiry through isa, cast, and dyn_cast:

Protected Member Functions

 TerminatorInst (Type *Ty, Instruction::TermOps iType, Use *Ops, unsigned NumOps, Instruction *InsertBefore=nullptr)
 TerminatorInst (Type *Ty, Instruction::TermOps iType, Use *Ops, unsigned NumOps, BasicBlock *InsertAtEnd)
 ~TerminatorInst ()
virtual BasicBlockgetSuccessorV (unsigned idx) const =0
virtual unsigned getNumSuccessorsV () const =0
virtual void setSuccessorV (unsigned idx, BasicBlock *B)=0
TerminatorInstclone_impl () const override=0

Detailed Description

Subclasses of this class are all able to terminate a basic block. Thus, these are all the flow control type of operations.

Definition at line 35 of file InstrTypes.h.


Constructor & Destructor Documentation

llvm::TerminatorInst::TerminatorInst ( Type Ty,
Instruction::TermOps  iType,
Use Ops,
unsigned  NumOps,
Instruction InsertBefore = nullptr 
) [inline, protected]

Definition at line 37 of file InstrTypes.h.

llvm::TerminatorInst::TerminatorInst ( Type Ty,
Instruction::TermOps  iType,
Use Ops,
unsigned  NumOps,
BasicBlock InsertAtEnd 
) [inline, protected]

Definition at line 42 of file InstrTypes.h.

Definition at line 45 of file Instructions.cpp.


Member Function Documentation

static bool llvm::TerminatorInst::classof ( const Instruction I) [inline, static]
static bool llvm::TerminatorInst::classof ( const Value V) [inline, static]

Methods for support type inquiry through isa, cast, and dyn_cast:

Reimplemented from llvm::Instruction.

Reimplemented in llvm::UnreachableInst, llvm::ResumeInst, llvm::InvokeInst, llvm::IndirectBrInst, llvm::SwitchInst, llvm::BranchInst, and llvm::ReturnInst.

Definition at line 76 of file InstrTypes.h.

References classof().

TerminatorInst* llvm::TerminatorInst::clone_impl ( ) const [override, protected, pure virtual]
virtual unsigned llvm::TerminatorInst::getNumSuccessorsV ( ) const [protected, pure virtual]

Referenced by getNumSuccessors().

virtual BasicBlock* llvm::TerminatorInst::getSuccessorV ( unsigned  idx) const [protected, pure virtual]

Virtual methods - Terminators should overload these and provide inline overrides of non-V methods.

Referenced by getSuccessor().

void llvm::TerminatorInst::setSuccessor ( unsigned  idx,
BasicBlock B 
) [inline]
virtual void llvm::TerminatorInst::setSuccessorV ( unsigned  idx,
BasicBlock B 
) [protected, pure virtual]

Referenced by setSuccessor().


The documentation for this class was generated from the following files: