LLVM 22.0.0git
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 >:
[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 (std::initializer_list< EltTy > IL)
 TinyPtrVector (ArrayRef< EltTy > Elts)
 Constructor from an ArrayRef.
 TinyPtrVector (size_t Count, EltTy Value)
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 * data ()
const EltTy * data () 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 29 of file TinyPtrVector.h.

Member Typedef Documentation

◆ const_iterator

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

Definition at line 150 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 152 of file TinyPtrVector.h.

◆ iterator

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

Definition at line 149 of file TinyPtrVector.h.

◆ PtrUnion

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

Definition at line 37 of file TinyPtrVector.h.

◆ reverse_iterator

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

Definition at line 151 of file TinyPtrVector.h.

◆ value_type

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

Definition at line 32 of file TinyPtrVector.h.

◆ VecTy

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

Definition at line 31 of file TinyPtrVector.h.

Constructor & Destructor Documentation

◆ TinyPtrVector() [1/6]

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

◆ ~TinyPtrVector()

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

Definition at line 45 of file TinyPtrVector.h.

◆ TinyPtrVector() [2/6]

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

Definition at line 50 of file TinyPtrVector.h.

◆ TinyPtrVector() [3/6]

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

Definition at line 83 of file TinyPtrVector.h.

◆ TinyPtrVector() [4/6]

template<typename EltTy>
llvm::TinyPtrVector< EltTy >::TinyPtrVector ( std::initializer_list< EltTy > IL)
inline

Definition at line 113 of file TinyPtrVector.h.

◆ TinyPtrVector() [5/6]

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 123 of file TinyPtrVector.h.

◆ TinyPtrVector() [6/6]

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

Definition at line 130 of file TinyPtrVector.h.

Member Function Documentation

◆ back()

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

Definition at line 208 of file TinyPtrVector.h.

◆ begin() [1/2]

◆ begin() [2/2]

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

Definition at line 168 of file TinyPtrVector.h.

◆ clear()

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

◆ data() [1/2]

template<typename EltTy>
EltTy * llvm::TinyPtrVector< EltTy >::data ( )
inline

Definition at line 187 of file TinyPtrVector.h.

◆ data() [2/2]

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

Definition at line 188 of file TinyPtrVector.h.

◆ empty()

◆ end() [1/2]

◆ end() [2/2]

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

Definition at line 172 of file TinyPtrVector.h.

◆ erase() [1/2]

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

Definition at line 252 of file TinyPtrVector.h.

◆ erase() [2/2]

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

Definition at line 268 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 282 of file TinyPtrVector.h.

◆ insert() [2/2]

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

Definition at line 302 of file TinyPtrVector.h.

◆ operator=() [1/2]

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

Definition at line 55 of file TinyPtrVector.h.

◆ operator=() [2/2]

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

Definition at line 87 of file TinyPtrVector.h.

◆ operator[]()

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

Definition at line 190 of file TinyPtrVector.h.

◆ pop_back()

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

Definition at line 234 of file TinyPtrVector.h.

◆ push_back()

◆ rbegin() [1/2]

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

Definition at line 176 of file TinyPtrVector.h.

◆ rbegin() [2/2]

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

Definition at line 179 of file TinyPtrVector.h.

◆ rend() [1/2]

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

Definition at line 177 of file TinyPtrVector.h.

◆ rend() [2/2]

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

Definition at line 183 of file TinyPtrVector.h.

◆ size()


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