LLVM  4.0.0
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
llvm::SwitchInst::CaseIteratorT< SwitchInstTy, ConstantIntTy, BasicBlockTy > Class Template Reference

#include <Instructions.h>

Inheritance diagram for llvm::SwitchInst::CaseIteratorT< SwitchInstTy, ConstantIntTy, BasicBlockTy >:
[legend]
Collaboration diagram for llvm::SwitchInst::CaseIteratorT< SwitchInstTy, ConstantIntTy, BasicBlockTy >:
[legend]

Public Types

typedef CaseIteratorT
< SwitchInstTy, ConstantIntTy,
BasicBlockTy > 
Self
 

Public Member Functions

 CaseIteratorT (SwitchInstTy *SI, unsigned CaseNum)
 Initializes case iterator for given SwitchInst and for given case number. More...
 
ConstantIntTy * getCaseValue ()
 Resolves case value for current case. More...
 
BasicBlockTy * getCaseSuccessor ()
 Resolves successor for current case. More...
 
unsigned getCaseIndex () const
 Returns number of current case. More...
 
unsigned getSuccessorIndex () const
 Returns TerminatorInst's successor index for current case successor. More...
 
Self operator++ ()
 
Self operator++ (int)
 
Self operator-- ()
 
Self operator-- (int)
 
bool operator== (const Self &RHS) const
 
bool operator!= (const Self &RHS) const
 
Selfoperator* ()
 

Static Public Member Functions

static Self fromSuccessorIndex (SwitchInstTy *SI, unsigned SuccessorIndex)
 Initializes case iterator for given SwitchInst and for given TerminatorInst's successor index. More...
 

Protected Attributes

SwitchInstTy * SI
 
unsigned Index
 

Detailed Description

template<class SwitchInstTy, class ConstantIntTy, class BasicBlockTy>
class llvm::SwitchInst::CaseIteratorT< SwitchInstTy, ConstantIntTy, BasicBlockTy >

Definition at line 3088 of file Instructions.h.

Member Typedef Documentation

template<class SwitchInstTy, class ConstantIntTy, class BasicBlockTy>
typedef CaseIteratorT<SwitchInstTy, ConstantIntTy, BasicBlockTy> llvm::SwitchInst::CaseIteratorT< SwitchInstTy, ConstantIntTy, BasicBlockTy >::Self

Definition at line 3094 of file Instructions.h.

Constructor & Destructor Documentation

template<class SwitchInstTy, class ConstantIntTy, class BasicBlockTy>
llvm::SwitchInst::CaseIteratorT< SwitchInstTy, ConstantIntTy, BasicBlockTy >::CaseIteratorT ( SwitchInstTy *  SI,
unsigned  CaseNum 
)
inline

Initializes case iterator for given SwitchInst and for given case number.

Definition at line 3098 of file Instructions.h.

Member Function Documentation

template<class SwitchInstTy, class ConstantIntTy, class BasicBlockTy>
static Self llvm::SwitchInst::CaseIteratorT< SwitchInstTy, ConstantIntTy, BasicBlockTy >::fromSuccessorIndex ( SwitchInstTy *  SI,
unsigned  SuccessorIndex 
)
inlinestatic

Initializes case iterator for given SwitchInst and for given TerminatorInst's successor index.

Definition at line 3105 of file Instructions.h.

Referenced by llvm::DOTGraphTraits< const Function * >::getEdgeSourceLabel().

template<class SwitchInstTy, class ConstantIntTy, class BasicBlockTy>
unsigned llvm::SwitchInst::CaseIteratorT< SwitchInstTy, ConstantIntTy, BasicBlockTy >::getCaseIndex ( ) const
inline

Returns number of current case.

Definition at line 3128 of file Instructions.h.

Referenced by EliminateDeadSwitchCases(), handleSwitchExpect(), and llvm::SwitchInst::removeCase().

template<class SwitchInstTy, class ConstantIntTy, class BasicBlockTy>
BasicBlockTy* llvm::SwitchInst::CaseIteratorT< SwitchInstTy, ConstantIntTy, BasicBlockTy >::getCaseSuccessor ( )
inline

Resolves successor for current case.

Definition at line 3120 of file Instructions.h.

Referenced by llvm::ConstantFoldTerminator(), EliminateDeadSwitchCases(), and SimplifySwitchOnSelect().

template<class SwitchInstTy, class ConstantIntTy, class BasicBlockTy>
ConstantIntTy* llvm::SwitchInst::CaseIteratorT< SwitchInstTy, ConstantIntTy, BasicBlockTy >::getCaseValue ( )
inline

Resolves case value for current case.

Definition at line 3114 of file Instructions.h.

Referenced by llvm::ConstantFoldTerminator(), and llvm::DOTGraphTraits< const Function * >::getEdgeSourceLabel().

template<class SwitchInstTy, class ConstantIntTy, class BasicBlockTy>
unsigned llvm::SwitchInst::CaseIteratorT< SwitchInstTy, ConstantIntTy, BasicBlockTy >::getSuccessorIndex ( ) const
inline

Returns TerminatorInst's successor index for current case successor.

Definition at line 3131 of file Instructions.h.

Referenced by SimplifySwitchOnSelect().

template<class SwitchInstTy, class ConstantIntTy, class BasicBlockTy>
bool llvm::SwitchInst::CaseIteratorT< SwitchInstTy, ConstantIntTy, BasicBlockTy >::operator!= ( const Self RHS) const
inline

Definition at line 3167 of file Instructions.h.

template<class SwitchInstTy, class ConstantIntTy, class BasicBlockTy>
Self& llvm::SwitchInst::CaseIteratorT< SwitchInstTy, ConstantIntTy, BasicBlockTy >::operator* ( )
inline

Definition at line 3171 of file Instructions.h.

template<class SwitchInstTy, class ConstantIntTy, class BasicBlockTy>
Self llvm::SwitchInst::CaseIteratorT< SwitchInstTy, ConstantIntTy, BasicBlockTy >::operator++ ( )
inline

Definition at line 3137 of file Instructions.h.

template<class SwitchInstTy, class ConstantIntTy, class BasicBlockTy>
Self llvm::SwitchInst::CaseIteratorT< SwitchInstTy, ConstantIntTy, BasicBlockTy >::operator++ ( int  )
inline

Definition at line 3144 of file Instructions.h.

template<class SwitchInstTy, class ConstantIntTy, class BasicBlockTy>
Self llvm::SwitchInst::CaseIteratorT< SwitchInstTy, ConstantIntTy, BasicBlockTy >::operator-- ( )
inline

Definition at line 3149 of file Instructions.h.

template<class SwitchInstTy, class ConstantIntTy, class BasicBlockTy>
Self llvm::SwitchInst::CaseIteratorT< SwitchInstTy, ConstantIntTy, BasicBlockTy >::operator-- ( int  )
inline

Definition at line 3158 of file Instructions.h.

template<class SwitchInstTy, class ConstantIntTy, class BasicBlockTy>
bool llvm::SwitchInst::CaseIteratorT< SwitchInstTy, ConstantIntTy, BasicBlockTy >::operator== ( const Self RHS) const
inline

Definition at line 3163 of file Instructions.h.

Member Data Documentation

template<class SwitchInstTy, class ConstantIntTy, class BasicBlockTy>
unsigned llvm::SwitchInst::CaseIteratorT< SwitchInstTy, ConstantIntTy, BasicBlockTy >::Index
protected
template<class SwitchInstTy, class ConstantIntTy, class BasicBlockTy>
SwitchInstTy* llvm::SwitchInst::CaseIteratorT< SwitchInstTy, ConstantIntTy, BasicBlockTy >::SI
protected

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