LLVM  mainline
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions
llvm::TerminatorInst Class Reference

Subclasses of this class are all able to terminate a basic block. More...

#include <InstrTypes.h>

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

List of all members.

Classes

class  SuccIterator

Public Types

typedef SuccIterator
< TerminatorInst *, BasicBlock
succ_iterator
typedef SuccIterator< const
TerminatorInst *, const
BasicBlock
succ_const_iterator
typedef llvm::iterator_range
< succ_iterator
succ_range
typedef llvm::iterator_range
< succ_const_iterator
succ_const_range

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.
bool isExceptional () const
succ_range successors ()
succ_const_range successors () const

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 () override
virtual BasicBlockgetSuccessorV (unsigned idx) const =0
 Virtual methods - Terminators should overload these and provide inline overrides of non-V methods.
virtual unsigned getNumSuccessorsV () const =0
virtual void setSuccessorV (unsigned idx, BasicBlock *B)=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 38 of file InstrTypes.h.


Member Typedef Documentation

Definition at line 251 of file InstrTypes.h.

Definition at line 253 of file InstrTypes.h.

Definition at line 249 of file InstrTypes.h.

Definition at line 252 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 40 of file InstrTypes.h.

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

Definition at line 45 of file InstrTypes.h.

TerminatorInst::~TerminatorInst ( ) [override, protected]

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::CleanupReturnInst, llvm::CatchReturnInst, llvm::CatchSwitchInst, llvm::ResumeInst, llvm::InvokeInst, llvm::IndirectBrInst, llvm::SwitchInst, llvm::BranchInst, and llvm::ReturnInst.

Definition at line 78 of file InstrTypes.h.

References classof().

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

Definition at line 83 of file InstrTypes.h.

References llvm::Instruction::getOpcode().

Referenced by llvm::MergeBlockIntoPredecessor().

void llvm::TerminatorInst::setSuccessor ( unsigned  idx,
BasicBlock B 
) [inline]

Update the specified successor to point at the provided block.

Reimplemented in llvm::CatchSwitchInst, llvm::InvokeInst, llvm::IndirectBrInst, llvm::SwitchInst, and llvm::BranchInst.

Definition at line 70 of file InstrTypes.h.

References setSuccessorV().

Referenced by CloneLoopBlocks(), FoldCondBranchOnPHI(), insertUniqueBackedgeBlock(), and llvm::SplitCriticalEdge().

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

Referenced by setSuccessor().

Definition at line 269 of file InstrTypes.h.


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