LLVM API Documentation
#include <Instructions.h>
Inheritance diagram for llvm::SwitchInst:
Public Member Functions | |
SwitchInst (Value *Value, BasicBlock *Default, Instruction *InsertBefore=0) | |
SwitchInst (Value *Value, BasicBlock *Default, BasicBlock *InsertAtEnd) | |
virtual SwitchInst * | clone () const |
Terminators must implement the methods required by Instruction... | |
const Value * | getCondition () const |
Value * | getCondition () |
const BasicBlock * | getDefaultDest () const |
BasicBlock * | getDefaultDest () |
unsigned | getNumCases () const |
Constant * | getCaseValue (unsigned i) |
const Constant * | getCaseValue (unsigned i) const |
unsigned | findCaseValue (const Constant *C) const |
void | addCase (Constant *OnVal, BasicBlock *Dest) |
void | removeCase (unsigned idx) |
virtual const BasicBlock * | getSuccessor (unsigned idx) const |
BasicBlock * | getSuccessor (unsigned idx) |
virtual void | setSuccessor (unsigned idx, BasicBlock *NewSucc) |
Set a successor at a given index. | |
const Constant * | getSuccessorValue (unsigned idx) const |
Constant * | getSuccessorValue (unsigned idx) |
virtual unsigned | getNumSuccessors () const |
Static Public Member Functions | |
static bool | classof (const SwitchInst *) |
static bool | classof (const Instruction *I) |
Methods for support type inquiry through isa, cast, and dyn_cast:. | |
static bool | classof (const Value *V) |
Definition at line 961 of file Instructions.h.
|
Definition at line 970 of file Instructions.h. |
|
Definition at line 974 of file Instructions.h. |
|
addCase - Add an entry to the switch instruction... Definition at line 778 of file Instructions.cpp. References llvm::User::Operands. Referenced by FoldValueComparisonIntoPredecessors(), llvm::BytecodeReader::ParseInstruction(), and llvm::SimplifyCFG(). |
|
Reimplemented from llvm::TerminatorInst. Definition at line 1063 of file Instructions.h. References classof(). |
|
Methods for support type inquiry through isa, cast, and dyn_cast:.
Reimplemented from llvm::TerminatorInst. Definition at line 1060 of file Instructions.h. References llvm::Instruction::getOpcode(), and llvm::ISD::Switch. |
|
Definition at line 1059 of file Instructions.h. Referenced by classof(). |
|
Terminators must implement the methods required by Instruction...
Implements llvm::TerminatorInst. Definition at line 819 of file Instructions.cpp. |
|
findCaseValue - Search all of the case values for the specified constant. If it is explicitly handled, return the case number of it, otherwise return 0 to indicate that it is handled by the default handler. Definition at line 1015 of file Instructions.h. References getCaseValue(), and getNumCases(). |
|
getCaseValue - Return the specified case value. Note that case #0, the default destination, does not have a case value. Definition at line 1007 of file Instructions.h. References getNumCases(), and getSuccessorValue(). |
|
getCaseValue - Return the specified case value. Note that case #0, the default destination, does not have a case value. Definition at line 1000 of file Instructions.h. References getNumCases(), and getSuccessorValue(). Referenced by findCaseValue(). |
|
Definition at line 984 of file Instructions.h. References llvm::User::Operands. |
|
Definition at line 983 of file Instructions.h. References llvm::User::Operands. |
|
Definition at line 988 of file Instructions.h. References llvm::User::Operands. |
|
Definition at line 985 of file Instructions.h. References llvm::User::Operands. Referenced by llvm::Interpreter::visitSwitchInst(). |
|
getNumCases - return the number of 'cases' in this switch instruction. Note that case #0 is always the default case. Definition at line 994 of file Instructions.h. References llvm::User::Operands. Referenced by findCaseValue(), and getCaseValue(). |
|
Implements llvm::TerminatorInst. Definition at line 1056 of file Instructions.h. References llvm::User::Operands. Referenced by FoldValueComparisonIntoPredecessors(), getSuccessor(), getSuccessorValue(), and setSuccessor(). |
|
Reimplemented from llvm::TerminatorInst. Definition at line 1036 of file Instructions.h. References getNumSuccessors(), and llvm::User::Operands. |
|
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()! Implements llvm::TerminatorInst. Definition at line 1032 of file Instructions.h. References getNumSuccessors(), and llvm::User::Operands. Referenced by FoldValueComparisonIntoPredecessors(). |
|
Definition at line 1052 of file Instructions.h. References getNumSuccessors(), and llvm::User::Operands. |
|
Definition at line 1048 of file Instructions.h. References getNumSuccessors(), and llvm::User::Operands. Referenced by getCaseValue(). |
|
removeCase - This method removes the specified successor from the switch instruction. Note that this cannot be used to remove the default destination (successor #0). Definition at line 787 of file Instructions.cpp. References llvm::User::Operands. |
|
Set a successor at a given index.
Implements llvm::TerminatorInst. Definition at line 1041 of file Instructions.h. References getNumSuccessors(), and llvm::User::Operands. Referenced by FoldValueComparisonIntoPredecessors(). |