LLVM  6.0.0svn
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 "llvm/ADT/TinyPtrVector.h"

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

Public Types

using VecTy = SmallVector< EltTy, 4 >
 
using value_type = typename VecTy::value_type
 
using PtrUnion = PointerUnion< EltTy, VecTy * >
 
using iterator = EltTy *
 
using const_iterator = const EltTy *
 
using reverse_iterator = std::reverse_iterator< iterator >
 
using const_reverse_iterator = std::reverse_iterator< const_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

◆ const_iterator

template<typename EltTy>
using llvm::TinyPtrVector< EltTy >::const_iterator = const EltTy *

Definition at line 171 of file TinyPtrVector.h.

◆ const_reverse_iterator

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

Definition at line 173 of file TinyPtrVector.h.

◆ iterator

template<typename EltTy>
using llvm::TinyPtrVector< EltTy >::iterator = EltTy *

Definition at line 170 of file TinyPtrVector.h.

◆ PtrUnion

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

Definition at line 35 of file TinyPtrVector.h.

◆ reverse_iterator

template<typename EltTy>
using llvm::TinyPtrVector< EltTy >::reverse_iterator = std::reverse_iterator<iterator>

Definition at line 172 of file TinyPtrVector.h.

◆ value_type

template<typename EltTy>
using llvm::TinyPtrVector< EltTy >::value_type = typename VecTy::value_type

Definition at line 34 of file TinyPtrVector.h.

◆ VecTy

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

Definition at line 33 of file TinyPtrVector.h.

Constructor & Destructor Documentation

◆ TinyPtrVector() [1/5]

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

◆ ~TinyPtrVector()

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

Definition at line 43 of file TinyPtrVector.h.

◆ TinyPtrVector() [2/5]

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

Definition at line 48 of file TinyPtrVector.h.

◆ TinyPtrVector() [3/5]

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

Definition at line 81 of file TinyPtrVector.h.

◆ TinyPtrVector() [4/5]

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.

◆ TinyPtrVector() [5/5]

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

Definition at line 121 of file TinyPtrVector.h.

Member Function Documentation

◆ back()

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().

◆ begin() [1/2]

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

◆ begin() [2/2]

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

Definition at line 189 of file TinyPtrVector.h.

◆ clear()

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

◆ empty()

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

◆ end() [1/2]

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

◆ end() [2/2]

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

Definition at line 193 of file TinyPtrVector.h.

◆ erase() [1/2]

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

Definition at line 272 of file TinyPtrVector.h.

Referenced by llvm::calculateClrEHStateNumbers().

◆ erase() [2/2]

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

Definition at line 288 of file TinyPtrVector.h.

◆ front()

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

◆ insert() [1/2]

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().

◆ insert() [2/2]

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.

◆ operator ArrayRef< EltTy >()

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

Definition at line 127 of file TinyPtrVector.h.

◆ operator ArrayRef< U >()

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.

◆ operator MutableArrayRef< EltTy >()

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

Definition at line 136 of file TinyPtrVector.h.

◆ operator=() [1/2]

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

Definition at line 53 of file TinyPtrVector.h.

◆ operator=() [2/2]

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

Definition at line 85 of file TinyPtrVector.h.

◆ operator[]()

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

Definition at line 208 of file TinyPtrVector.h.

◆ pop_back()

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

Definition at line 253 of file TinyPtrVector.h.

◆ push_back()

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

◆ rbegin() [1/2]

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

Definition at line 197 of file TinyPtrVector.h.

◆ rbegin() [2/2]

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

Definition at line 200 of file TinyPtrVector.h.

◆ rend() [1/2]

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

Definition at line 198 of file TinyPtrVector.h.

◆ rend() [2/2]

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

Definition at line 204 of file TinyPtrVector.h.

◆ size()

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

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