LLVM API Documentation

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

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

virtual Instructionclone () const =0
 Terminators must implement the methods required by Instruction...
virtual const BasicBlockgetSuccessor (unsigned idx) const =0
virtual unsigned getNumSuccessors () const =0
virtual void setSuccessor (unsigned idx, BasicBlock *B)=0
 Set a successor at a given index.
BasicBlockgetSuccessor (unsigned idx)

Static Public Member Functions

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

Protected Member Functions

 TerminatorInst (Instruction::TermOps iType, Instruction *InsertBefore=0)
 TerminatorInst (const Type *Ty, Instruction::TermOps iType, const std::string &Name="", Instruction *InsertBefore=0)
 TerminatorInst (Instruction::TermOps iType, BasicBlock *InsertAtEnd)
 TerminatorInst (const Type *Ty, Instruction::TermOps iType, const std::string &Name, BasicBlock *InsertAtEnd)

Detailed Description

TerminatorInst - 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 30 of file InstrTypes.h.


Constructor & Destructor Documentation

TerminatorInst::TerminatorInst Instruction::TermOps  iType,
Instruction InsertBefore = 0
[protected]
 

Definition at line 26 of file InstrTypes.cpp.

llvm::TerminatorInst::TerminatorInst const Type Ty,
Instruction::TermOps  iType,
const std::string &  Name = "",
Instruction InsertBefore = 0
[inline, protected]
 

Definition at line 33 of file InstrTypes.h.

TerminatorInst::TerminatorInst Instruction::TermOps  iType,
BasicBlock InsertAtEnd
[protected]
 

Definition at line 30 of file InstrTypes.cpp.

llvm::TerminatorInst::TerminatorInst const Type Ty,
Instruction::TermOps  iType,
const std::string &  Name,
BasicBlock InsertAtEnd
[inline, protected]
 

Definition at line 38 of file InstrTypes.h.


Member Function Documentation

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

Reimplemented from llvm::Instruction.

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

Definition at line 67 of file InstrTypes.h.

References classof().

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

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

Reimplemented from llvm::Instruction.

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

Definition at line 64 of file InstrTypes.h.

References llvm::Instruction::getOpcode().

static bool llvm::TerminatorInst::classof const TerminatorInst  )  [inline, static]
 

Definition at line 63 of file InstrTypes.h.

Referenced by classof().

virtual Instruction* llvm::TerminatorInst::clone  )  const [pure virtual]
 

Terminators must implement the methods required by Instruction...

Implements llvm::Instruction.

Implemented in llvm::ReturnInst, llvm::BranchInst, llvm::SwitchInst, llvm::InvokeInst, llvm::UnwindInst, and llvm::UnreachableInst.

Referenced by llvm::SimplifyCFG().

virtual unsigned llvm::TerminatorInst::getNumSuccessors  )  const [pure virtual]
 

Implemented in llvm::ReturnInst, llvm::BranchInst, llvm::SwitchInst, llvm::InvokeInst, llvm::UnwindInst, and llvm::UnreachableInst.

Referenced by llvm::ProfileInfoLoader::getBlockCounts(), llvm::isCriticalEdge(), and llvm::RemoveSuccessor().

BasicBlock* llvm::TerminatorInst::getSuccessor unsigned  idx  )  [inline]
 

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

Definition at line 57 of file InstrTypes.h.

References getSuccessor().

virtual const BasicBlock* llvm::TerminatorInst::getSuccessor unsigned  idx  )  const [pure virtual]
 

Additionally, they must provide a method to get at the successors of this terminator instruction. 'idx' may not be >= the number of successors returned by getNumSuccessors()!

Implemented in llvm::ReturnInst, llvm::BranchInst, llvm::SwitchInst, llvm::InvokeInst, llvm::UnwindInst, and llvm::UnreachableInst.

Referenced by llvm::ProfileInfoLoader::getBlockCounts(), getSuccessor(), llvm::isCriticalEdge(), llvm::RemoveSuccessor(), and llvm::SplitCriticalEdge().

virtual void llvm::TerminatorInst::setSuccessor unsigned  idx,
BasicBlock B
[pure virtual]
 

Set a successor at a given index.

Implemented in llvm::ReturnInst, llvm::BranchInst, llvm::SwitchInst, llvm::InvokeInst, llvm::UnwindInst, and llvm::UnreachableInst.

Referenced by llvm::SplitCriticalEdge().


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