LLVM  5.0.0svn
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
llvm::SwitchInst::CaseIteratorT< SwitchInstT, ConstantIntT, BasicBlockT > Class Template Reference

#include <Instructions.h>

Inheritance diagram for llvm::SwitchInst::CaseIteratorT< SwitchInstT, ConstantIntT, BasicBlockT >:
Inheritance graph
[legend]
Collaboration diagram for llvm::SwitchInst::CaseIteratorT< SwitchInstT, ConstantIntT, BasicBlockT >:
Collaboration graph
[legend]

Public Types

typedef CaseIteratorT< SwitchInstT, ConstantIntT, BasicBlockT > Self
 

Public Member Functions

 CaseIteratorT ()
 Default constructed iterator is in an invalid state until assigned to a case for a particular switch. More...
 
 CaseIteratorT (SwitchInstT *SI, unsigned CaseNum)
 Initializes case iterator for given SwitchInst and for given case number. More...
 
ConstantIntT * getCaseValue ()
 Resolves case value for current case. More...
 
BasicBlockT * 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...
 
Selfoperator+= (ptrdiff_t N)
 
Selfoperator-= (ptrdiff_t N)
 
bool operator== (const Self &RHS) const
 
bool operator< (const Self &RHS) const
 
Selfoperator* ()
 
const Selfoperator* () const
 
- Public Member Functions inherited from llvm::iterator_facade_base< CaseIteratorT< SwitchInstT, ConstantIntT, BasicBlockT >, std::random_access_iterator_tag, CaseIteratorT< SwitchInstT, ConstantIntT, BasicBlockT > >
CaseIteratorT< SwitchInstT, ConstantIntT, BasicBlockT > operator+ (std::ptrdiff_t n) const
 
CaseIteratorT< SwitchInstT, ConstantIntT, BasicBlockT > operator- (std::ptrdiff_t n) const
 
CaseIteratorT< SwitchInstT, ConstantIntT, BasicBlockT > & operator++ ()
 
CaseIteratorT< SwitchInstT, ConstantIntT, BasicBlockT > operator++ (int)
 
CaseIteratorT< SwitchInstT, ConstantIntT, BasicBlockT > & operator-- ()
 
CaseIteratorT< SwitchInstT, ConstantIntT, BasicBlockT > operator-- (int)
 
bool operator!= (const CaseIteratorT< SwitchInstT, ConstantIntT, BasicBlockT > &RHS) const
 
bool operator> (const CaseIteratorT< SwitchInstT, ConstantIntT, BasicBlockT > &RHS) const
 
bool operator<= (const CaseIteratorT< SwitchInstT, ConstantIntT, BasicBlockT > &RHS) const
 
bool operator>= (const CaseIteratorT< SwitchInstT, ConstantIntT, BasicBlockT > &RHS) const
 
CaseIteratorT< SwitchInstT, ConstantIntT, BasicBlockT > * operator-> () const
 
ReferenceProxy operator[] (std::ptrdiff_t n) const
 

Static Public Member Functions

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

Protected Attributes

SwitchInstT * SI
 
ptrdiff_t Index
 

Additional Inherited Members

- Protected Types inherited from llvm::iterator_facade_base< CaseIteratorT< SwitchInstT, ConstantIntT, BasicBlockT >, std::random_access_iterator_tag, CaseIteratorT< SwitchInstT, ConstantIntT, BasicBlockT > >
enum  
 

Detailed Description

template<class SwitchInstT, class ConstantIntT, class BasicBlockT>
class llvm::SwitchInst::CaseIteratorT< SwitchInstT, ConstantIntT, BasicBlockT >

Definition at line 3100 of file Instructions.h.

Member Typedef Documentation

◆ Self

template<class SwitchInstT, class ConstantIntT, class BasicBlockT>
typedef CaseIteratorT<SwitchInstT, ConstantIntT, BasicBlockT> llvm::SwitchInst::CaseIteratorT< SwitchInstT, ConstantIntT, BasicBlockT >::Self

Definition at line 3110 of file Instructions.h.

Constructor & Destructor Documentation

◆ CaseIteratorT() [1/2]

template<class SwitchInstT, class ConstantIntT, class BasicBlockT>
llvm::SwitchInst::CaseIteratorT< SwitchInstT, ConstantIntT, BasicBlockT >::CaseIteratorT ( )
inline

Default constructed iterator is in an invalid state until assigned to a case for a particular switch.

Definition at line 3114 of file Instructions.h.

◆ CaseIteratorT() [2/2]

template<class SwitchInstT, class ConstantIntT, class BasicBlockT>
llvm::SwitchInst::CaseIteratorT< SwitchInstT, ConstantIntT, BasicBlockT >::CaseIteratorT ( SwitchInstT *  SI,
unsigned  CaseNum 
)
inline

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

Definition at line 3118 of file Instructions.h.

Member Function Documentation

◆ fromSuccessorIndex()

template<class SwitchInstT, class ConstantIntT, class BasicBlockT>
static Self llvm::SwitchInst::CaseIteratorT< SwitchInstT, ConstantIntT, BasicBlockT >::fromSuccessorIndex ( SwitchInstT *  SI,
unsigned  SuccessorIndex 
)
inlinestatic

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

Definition at line 3125 of file Instructions.h.

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

◆ getCaseIndex()

template<class SwitchInstT, class ConstantIntT, class BasicBlockT>
unsigned llvm::SwitchInst::CaseIteratorT< SwitchInstT, ConstantIntT, BasicBlockT >::getCaseIndex ( ) const
inline

Returns number of current case.

Definition at line 3149 of file Instructions.h.

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

◆ getCaseSuccessor()

template<class SwitchInstT, class ConstantIntT, class BasicBlockT>
BasicBlockT* llvm::SwitchInst::CaseIteratorT< SwitchInstT, ConstantIntT, BasicBlockT >::getCaseSuccessor ( )
inline

◆ getCaseValue()

template<class SwitchInstT, class ConstantIntT, class BasicBlockT>
ConstantIntT* llvm::SwitchInst::CaseIteratorT< SwitchInstT, ConstantIntT, BasicBlockT >::getCaseValue ( )
inline

Resolves case value for current case.

Definition at line 3134 of file Instructions.h.

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

◆ getSuccessorIndex()

template<class SwitchInstT, class ConstantIntT, class BasicBlockT>
unsigned llvm::SwitchInst::CaseIteratorT< SwitchInstT, ConstantIntT, BasicBlockT >::getSuccessorIndex ( ) const
inline

Returns TerminatorInst's successor index for current case successor.

Definition at line 3152 of file Instructions.h.

Referenced by llvm::SparseSolver::getOrInitValueState(), and SimplifySwitchOnSelect().

◆ operator*() [1/2]

template<class SwitchInstT, class ConstantIntT, class BasicBlockT>
Self& llvm::SwitchInst::CaseIteratorT< SwitchInstT, ConstantIntT, BasicBlockT >::operator* ( )
inline

Definition at line 3183 of file Instructions.h.

◆ operator*() [2/2]

template<class SwitchInstT, class ConstantIntT, class BasicBlockT>
const Self& llvm::SwitchInst::CaseIteratorT< SwitchInstT, ConstantIntT, BasicBlockT >::operator* ( ) const
inline

Definition at line 3184 of file Instructions.h.

◆ operator+=()

template<class SwitchInstT, class ConstantIntT, class BasicBlockT>
Self& llvm::SwitchInst::CaseIteratorT< SwitchInstT, ConstantIntT, BasicBlockT >::operator+= ( ptrdiff_t  N)
inline

Definition at line 3159 of file Instructions.h.

◆ operator-=()

template<class SwitchInstT, class ConstantIntT, class BasicBlockT>
Self& llvm::SwitchInst::CaseIteratorT< SwitchInstT, ConstantIntT, BasicBlockT >::operator-= ( ptrdiff_t  N)
inline

Definition at line 3167 of file Instructions.h.

◆ operator<()

template<class SwitchInstT, class ConstantIntT, class BasicBlockT>
bool llvm::SwitchInst::CaseIteratorT< SwitchInstT, ConstantIntT, BasicBlockT >::operator< ( const Self RHS) const
inline

Definition at line 3179 of file Instructions.h.

◆ operator==()

template<class SwitchInstT, class ConstantIntT, class BasicBlockT>
bool llvm::SwitchInst::CaseIteratorT< SwitchInstT, ConstantIntT, BasicBlockT >::operator== ( const Self RHS) const
inline

Definition at line 3175 of file Instructions.h.

Member Data Documentation

◆ Index

template<class SwitchInstT, class ConstantIntT, class BasicBlockT>
ptrdiff_t llvm::SwitchInst::CaseIteratorT< SwitchInstT, ConstantIntT, BasicBlockT >::Index
protected

◆ SI

template<class SwitchInstT, class ConstantIntT, class BasicBlockT>
SwitchInstT* llvm::SwitchInst::CaseIteratorT< SwitchInstT, ConstantIntT, BasicBlockT >::SI
protected

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