LLVM API Documentation

Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends
llvm::SwitchInst::CaseIteratorT< SwitchInstTy, ConstantIntTy, SubsetsItTy, BasicBlockTy > Class Template Reference

#include <Instructions.h>

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

List of all members.

Public Types

typedef SubsetsItTy::reference IntegersSubsetRef
typedef CaseIteratorT
< SwitchInstTy, ConstantIntTy,
SubsetsItTy, BasicBlockTy > 
Self

Public Member Functions

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

Static Public Member Functions

static Self fromSuccessorIndex (SwitchInstTy *SI, unsigned SuccessorIndex)

Protected Member Functions

 CaseIteratorT (SwitchInstTy *SI, unsigned SuccessorIndex, SubsetsItTy CaseValueIt)

Protected Attributes

SwitchInstTy * SI
unsigned Index
SubsetsItTy SubsetIt

Friends

class SwitchInst

Detailed Description

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

Definition at line 2657 of file Instructions.h.


Member Typedef Documentation

template<class SwitchInstTy, class ConstantIntTy, class SubsetsItTy, class BasicBlockTy>
typedef SubsetsItTy::reference llvm::SwitchInst::CaseIteratorT< SwitchInstTy, ConstantIntTy, SubsetsItTy, BasicBlockTy >::IntegersSubsetRef

Definition at line 2675 of file Instructions.h.

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

Definition at line 2677 of file Instructions.h.


Constructor & Destructor Documentation

template<class SwitchInstTy, class ConstantIntTy, class SubsetsItTy, class BasicBlockTy>
llvm::SwitchInst::CaseIteratorT< SwitchInstTy, ConstantIntTy, SubsetsItTy, BasicBlockTy >::CaseIteratorT ( SwitchInstTy *  SI,
unsigned  SuccessorIndex,
SubsetsItTy  CaseValueIt 
) [inline, protected]

Definition at line 2667 of file Instructions.h.

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

Definition at line 2679 of file Instructions.h.


Member Function Documentation

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

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

Definition at line 2689 of file Instructions.h.

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

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

Returns number of current case.

Definition at line 2723 of file Instructions.h.

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

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

Resolves successor for current case.

Definition at line 2715 of file Instructions.h.

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

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

Resolves case value for current case.

Deprecated:

Definition at line 2699 of file Instructions.h.

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

template<class SwitchInstTy, class ConstantIntTy, class SubsetsItTy, class BasicBlockTy>
IntegersSubsetRef llvm::SwitchInst::CaseIteratorT< SwitchInstTy, ConstantIntTy, SubsetsItTy, BasicBlockTy >::getCaseValueEx ( ) [inline]

Resolves case value for current case.

Definition at line 2709 of file Instructions.h.

Referenced by llvm::ConstantFoldTerminator().

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

Returns TerminatorInst's successor index for current case successor.

Definition at line 2726 of file Instructions.h.

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

Definition at line 2775 of file Instructions.h.

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

Definition at line 2732 of file Instructions.h.

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

Definition at line 2743 of file Instructions.h.

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

Definition at line 2748 of file Instructions.h.

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

Definition at line 2766 of file Instructions.h.

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

Definition at line 2771 of file Instructions.h.


Friends And Related Function Documentation

template<class SwitchInstTy, class ConstantIntTy, class SubsetsItTy, class BasicBlockTy>
friend class SwitchInst [friend]

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

Reimplemented in llvm::SwitchInst::CaseIt.

Definition at line 2666 of file Instructions.h.


Member Data Documentation

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

Definition at line 2662 of file Instructions.h.

Referenced by llvm::SwitchInst::removeCase().


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