LLVM  4.0.0
Public Types | Public Member Functions | List of all members
llvm::TinyPtrVector< EltTy > Class Template Reference

TinyPtrVector - This class is specialized for cases where there are normally 0 or 1 element in a vector, but is general enough to go beyond that when required. More...

#include <TinyPtrVector.h>

Inheritance diagram for llvm::TinyPtrVector< EltTy >:
[legend]

Public Types

typedef SmallVector< EltTy, 4 > VecTy
 
typedef VecTy::value_type value_type
 
typedef PointerUnion< EltTy,
VecTy * > 
PtrUnion
 
typedef EltTy * iterator
 
typedef const EltTy * const_iterator
 
typedef std::reverse_iterator
< iterator
reverse_iterator
 
typedef std::reverse_iterator
< const_iterator
const_reverse_iterator
 

Public Member Functions

 TinyPtrVector ()=default
 
 ~TinyPtrVector ()
 
 TinyPtrVector (const TinyPtrVector &RHS)
 
TinyPtrVectoroperator= (const TinyPtrVector &RHS)
 
 TinyPtrVector (TinyPtrVector &&RHS)
 
TinyPtrVectoroperator= (TinyPtrVector &&RHS)
 
 TinyPtrVector (ArrayRef< EltTy > Elts)
 Constructor from an ArrayRef. More...
 
 TinyPtrVector (size_t Count, EltTy Value)
 
 operator ArrayRef< EltTy > () const
 
 operator MutableArrayRef< EltTy > ()
 
template<typename U , typename std::enable_if< std::is_convertible< ArrayRef< EltTy >, ArrayRef< U >>::value, bool >::type = false>
 operator ArrayRef< U > () const
 
bool empty () const
 
unsigned size () const
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
reverse_iterator rbegin ()
 
reverse_iterator rend ()
 
const_reverse_iterator rbegin () const
 
const_reverse_iterator rend () const
 
EltTy operator[] (unsigned i) const
 
EltTy front () const
 
EltTy back () const
 
void push_back (EltTy NewVal)
 
void pop_back ()
 
void clear ()
 
iterator erase (iterator I)
 
iterator erase (iterator S, iterator E)
 
iterator insert (iterator I, const EltTy &Elt)
 
template<typename ItTy >
iterator insert (iterator I, ItTy From, ItTy To)
 

Detailed Description

template<typename EltTy>
class llvm::TinyPtrVector< EltTy >

TinyPtrVector - This class is specialized for cases where there are normally 0 or 1 element in a vector, but is general enough to go beyond that when required.

NOTE: This container doesn't allow you to store a null pointer into it.

Definition at line 31 of file TinyPtrVector.h.

Member Typedef Documentation

template<typename EltTy>
typedef const EltTy* llvm::TinyPtrVector< EltTy >::const_iterator

Definition at line 171 of file TinyPtrVector.h.

template<typename EltTy>
typedef std::reverse_iterator<const_iterator> llvm::TinyPtrVector< EltTy >::const_reverse_iterator

Definition at line 173 of file TinyPtrVector.h.

template<typename EltTy>
typedef EltTy* llvm::TinyPtrVector< EltTy >::iterator

Definition at line 170 of file TinyPtrVector.h.

template<typename EltTy>
typedef PointerUnion<EltTy, VecTy *> llvm::TinyPtrVector< EltTy >::PtrUnion

Definition at line 35 of file TinyPtrVector.h.

template<typename EltTy>
typedef std::reverse_iterator<iterator> llvm::TinyPtrVector< EltTy >::reverse_iterator

Definition at line 172 of file TinyPtrVector.h.

template<typename EltTy>
typedef VecTy::value_type llvm::TinyPtrVector< EltTy >::value_type

Definition at line 34 of file TinyPtrVector.h.

template<typename EltTy>
typedef SmallVector<EltTy, 4> llvm::TinyPtrVector< EltTy >::VecTy

Definition at line 33 of file TinyPtrVector.h.

Constructor & Destructor Documentation

template<typename EltTy>
llvm::TinyPtrVector< EltTy >::TinyPtrVector ( )
default
template<typename EltTy>
llvm::TinyPtrVector< EltTy >::~TinyPtrVector ( )
inline

Definition at line 43 of file TinyPtrVector.h.

template<typename EltTy>
llvm::TinyPtrVector< EltTy >::TinyPtrVector ( const TinyPtrVector< EltTy > &  RHS)
inline

Definition at line 48 of file TinyPtrVector.h.

template<typename EltTy>
llvm::TinyPtrVector< EltTy >::TinyPtrVector ( TinyPtrVector< EltTy > &&  RHS)
inline

Definition at line 81 of file TinyPtrVector.h.

template<typename EltTy>
llvm::TinyPtrVector< EltTy >::TinyPtrVector ( ArrayRef< EltTy >  Elts)
inlineexplicit

Constructor from an ArrayRef.

This also is a constructor for individual array elements due to the single element constructor for ArrayRef.

Definition at line 114 of file TinyPtrVector.h.

template<typename EltTy>
llvm::TinyPtrVector< EltTy >::TinyPtrVector ( size_t  Count,
EltTy  Value 
)
inline

Definition at line 121 of file TinyPtrVector.h.

Member Function Documentation

template<typename EltTy>
EltTy llvm::TinyPtrVector< EltTy >::back ( ) const
inline

Definition at line 227 of file TinyPtrVector.h.

Referenced by llvm::TinyPtrVector< llvm::MCSymbol * >::back().

template<typename EltTy>
iterator llvm::TinyPtrVector< EltTy >::begin ( )
inline
template<typename EltTy>
const_iterator llvm::TinyPtrVector< EltTy >::begin ( ) const
inline

Definition at line 189 of file TinyPtrVector.h.

template<typename EltTy>
void llvm::TinyPtrVector< EltTy >::clear ( )
inline
template<typename EltTy>
bool llvm::TinyPtrVector< EltTy >::empty ( ) const
inline
template<typename EltTy>
iterator llvm::TinyPtrVector< EltTy >::end ( )
inline
template<typename EltTy>
const_iterator llvm::TinyPtrVector< EltTy >::end ( ) const
inline

Definition at line 193 of file TinyPtrVector.h.

template<typename EltTy>
iterator llvm::TinyPtrVector< EltTy >::erase ( iterator  I)
inline

Definition at line 272 of file TinyPtrVector.h.

template<typename EltTy>
iterator llvm::TinyPtrVector< EltTy >::erase ( iterator  S,
iterator  E 
)
inline

Definition at line 288 of file TinyPtrVector.h.

template<typename EltTy>
EltTy llvm::TinyPtrVector< EltTy >::front ( ) const
inline
template<typename EltTy>
iterator llvm::TinyPtrVector< EltTy >::insert ( iterator  I,
const EltTy &  Elt 
)
inline

Definition at line 302 of file TinyPtrVector.h.

Referenced by llvm::TinyPtrVector< llvm::MCSymbol * >::insert().

template<typename EltTy>
template<typename ItTy >
iterator llvm::TinyPtrVector< EltTy >::insert ( iterator  I,
ItTy  From,
ItTy  To 
)
inline

Definition at line 321 of file TinyPtrVector.h.

template<typename EltTy>
llvm::TinyPtrVector< EltTy >::operator ArrayRef< EltTy > ( ) const
inline

Definition at line 127 of file TinyPtrVector.h.

template<typename EltTy>
template<typename U , typename std::enable_if< std::is_convertible< ArrayRef< EltTy >, ArrayRef< U >>::value, bool >::type = false>
llvm::TinyPtrVector< EltTy >::operator ArrayRef< U > ( ) const
inline

Definition at line 149 of file TinyPtrVector.h.

template<typename EltTy>
llvm::TinyPtrVector< EltTy >::operator MutableArrayRef< EltTy > ( )
inline

Definition at line 136 of file TinyPtrVector.h.

template<typename EltTy>
TinyPtrVector& llvm::TinyPtrVector< EltTy >::operator= ( const TinyPtrVector< EltTy > &  RHS)
inline

Definition at line 53 of file TinyPtrVector.h.

template<typename EltTy>
TinyPtrVector& llvm::TinyPtrVector< EltTy >::operator= ( TinyPtrVector< EltTy > &&  RHS)
inline

Definition at line 85 of file TinyPtrVector.h.

template<typename EltTy>
EltTy llvm::TinyPtrVector< EltTy >::operator[] ( unsigned  i) const
inline

Definition at line 208 of file TinyPtrVector.h.

template<typename EltTy>
void llvm::TinyPtrVector< EltTy >::pop_back ( )
inline

Definition at line 253 of file TinyPtrVector.h.

template<typename EltTy>
void llvm::TinyPtrVector< EltTy >::push_back ( EltTy  NewVal)
inline
template<typename EltTy>
reverse_iterator llvm::TinyPtrVector< EltTy >::rbegin ( )
inline

Definition at line 197 of file TinyPtrVector.h.

template<typename EltTy>
const_reverse_iterator llvm::TinyPtrVector< EltTy >::rbegin ( ) const
inline

Definition at line 200 of file TinyPtrVector.h.

template<typename EltTy>
reverse_iterator llvm::TinyPtrVector< EltTy >::rend ( )
inline

Definition at line 198 of file TinyPtrVector.h.

template<typename EltTy>
const_reverse_iterator llvm::TinyPtrVector< EltTy >::rend ( ) const
inline

Definition at line 204 of file TinyPtrVector.h.

template<typename EltTy>
unsigned llvm::TinyPtrVector< EltTy >::size ( ) const
inline

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