LLVM  8.0.1
Public Member Functions | List of all members
llvm::SmallPtrSet< PtrType, SmallSize > Class Template Reference

SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements. More...

#include "llvm/ADT/SmallPtrSet.h"

Inherits llvm::SmallPtrSetImpl< PtrType >.

Collaboration diagram for llvm::SmallPtrSet< PtrType, SmallSize >:
Collaboration graph
[legend]

Public Member Functions

 SmallPtrSet ()
 
 SmallPtrSet (const SmallPtrSet &that)
 
 SmallPtrSet (SmallPtrSet &&that)
 
template<typename It >
 SmallPtrSet (It I, It E)
 
 SmallPtrSet (std::initializer_list< PtrType > IL)
 
SmallPtrSet< PtrType, SmallSize > & operator= (const SmallPtrSet< PtrType, SmallSize > &RHS)
 
SmallPtrSet< PtrType, SmallSize > & operator= (SmallPtrSet< PtrType, SmallSize > &&RHS)
 
SmallPtrSet< PtrType, SmallSize > & operator= (std::initializer_list< PtrType > IL)
 
void swap (SmallPtrSet< PtrType, SmallSize > &RHS)
 swap - Swaps the elements of two sets. More...
 
- Public Member Functions inherited from llvm::SmallPtrSetImpl< PtrType >
 SmallPtrSetImpl (const SmallPtrSetImpl &)=delete
 
std::pair< iterator, boolinsert (PtrType Ptr)
 Inserts Ptr if and only if there is no element in the container equal to Ptr. More...
 
bool erase (PtrType Ptr)
 erase - If the set contains the specified pointer, remove it and return true, otherwise return false. More...
 
size_type count (ConstPtrType Ptr) const
 count - Return 1 if the specified pointer is in the set, 0 otherwise. More...
 
iterator find (ConstPtrType Ptr) const
 
template<typename IterT >
void insert (IterT I, IterT E)
 
void insert (std::initializer_list< PtrType > IL)
 
iterator begin () const
 
iterator end () const
 
- Public Member Functions inherited from llvm::SmallPtrSetImplBase
SmallPtrSetImplBaseoperator= (const SmallPtrSetImplBase &)=delete
 
LLVM_NODISCARD bool empty () const
 
size_type size () const
 
void clear ()
 
- Public Member Functions inherited from llvm::DebugEpochBase
 DebugEpochBase ()
 
void incrementEpoch ()
 Calling incrementEpoch invalidates all handles pointing into the calling instance. More...
 
 ~DebugEpochBase ()
 The destructor calls incrementEpoch to make use-after-free bugs more likely to crash deterministically. More...
 

Additional Inherited Members

- Public Types inherited from llvm::SmallPtrSetImpl< PtrType >
using iterator = SmallPtrSetIterator< PtrType >
 
using const_iterator = SmallPtrSetIterator< PtrType >
 
using key_type = ConstPtrType
 
using value_type = PtrType
 
- Public Types inherited from llvm::SmallPtrSetImplBase
using size_type = unsigned
 
- Protected Member Functions inherited from llvm::SmallPtrSetImpl< PtrType >
 SmallPtrSetImpl (const void **SmallStorage, const SmallPtrSetImpl &that)
 
 SmallPtrSetImpl (const void **SmallStorage, unsigned SmallSize, SmallPtrSetImpl &&that)
 
 SmallPtrSetImpl (const void **SmallStorage, unsigned SmallSize)
 
- Protected Member Functions inherited from llvm::SmallPtrSetImplBase
 SmallPtrSetImplBase (const void **SmallStorage, const SmallPtrSetImplBase &that)
 
 SmallPtrSetImplBase (const void **SmallStorage, unsigned SmallSize, SmallPtrSetImplBase &&that)
 
 SmallPtrSetImplBase (const void **SmallStorage, unsigned SmallSize)
 
 ~SmallPtrSetImplBase ()
 
const void ** EndPointer () const
 
std::pair< const void *const *, boolinsert_imp (const void *Ptr)
 insert_imp - This returns true if the pointer was new to the set, false if it was already in the set. More...
 
bool erase_imp (const void *Ptr)
 erase_imp - If the set contains the specified pointer, remove it and return true, otherwise return false. More...
 
const void *constfind_imp (const void *Ptr) const
 Returns the raw pointer needed to construct an iterator. More...
 
void swap (SmallPtrSetImplBase &RHS)
 swap - Swaps the elements of two sets. More...
 
void CopyFrom (const SmallPtrSetImplBase &RHS)
 
void MoveFrom (unsigned SmallSize, SmallPtrSetImplBase &&RHS)
 
- Static Protected Member Functions inherited from llvm::SmallPtrSetImplBase
static void * getTombstoneMarker ()
 
static void * getEmptyMarker ()
 
- Protected Attributes inherited from llvm::SmallPtrSetImplBase
const void ** SmallArray
 SmallArray - Points to a fixed size set of buckets, used in 'small mode'. More...
 
const void ** CurArray
 CurArray - This is the current set of buckets. More...
 
unsigned CurArraySize
 CurArraySize - The allocated size of CurArray, always a power of two. More...
 
unsigned NumNonEmpty
 Number of elements in CurArray that contain a value or are a tombstone. More...
 
unsigned NumTombstones
 Number of tombstones in CurArray. More...
 

Detailed Description

template<class PtrType, unsigned SmallSize>
class llvm::SmallPtrSet< PtrType, SmallSize >

SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements.

This internally rounds up SmallSize to the next power of two if it is not already a power of two. See the comments above SmallPtrSetImplBase for details of the algorithm.

Definition at line 418 of file SmallPtrSet.h.

Constructor & Destructor Documentation

◆ SmallPtrSet() [1/5]

template<class PtrType, unsigned SmallSize>
llvm::SmallPtrSet< PtrType, SmallSize >::SmallPtrSet ( )
inline

Definition at line 432 of file SmallPtrSet.h.

◆ SmallPtrSet() [2/5]

template<class PtrType, unsigned SmallSize>
llvm::SmallPtrSet< PtrType, SmallSize >::SmallPtrSet ( const SmallPtrSet< PtrType, SmallSize > &  that)
inline

Definition at line 433 of file SmallPtrSet.h.

◆ SmallPtrSet() [3/5]

template<class PtrType, unsigned SmallSize>
llvm::SmallPtrSet< PtrType, SmallSize >::SmallPtrSet ( SmallPtrSet< PtrType, SmallSize > &&  that)
inline

Definition at line 434 of file SmallPtrSet.h.

◆ SmallPtrSet() [4/5]

template<class PtrType, unsigned SmallSize>
template<typename It >
llvm::SmallPtrSet< PtrType, SmallSize >::SmallPtrSet ( It  I,
It  E 
)
inline

Definition at line 438 of file SmallPtrSet.h.

◆ SmallPtrSet() [5/5]

template<class PtrType, unsigned SmallSize>
llvm::SmallPtrSet< PtrType, SmallSize >::SmallPtrSet ( std::initializer_list< PtrType >  IL)
inline

Definition at line 442 of file SmallPtrSet.h.

Member Function Documentation

◆ operator=() [1/3]

template<class PtrType, unsigned SmallSize>
SmallPtrSet<PtrType, SmallSize>& llvm::SmallPtrSet< PtrType, SmallSize >::operator= ( const SmallPtrSet< PtrType, SmallSize > &  RHS)
inline

Definition at line 448 of file SmallPtrSet.h.

◆ operator=() [2/3]

template<class PtrType, unsigned SmallSize>
SmallPtrSet<PtrType, SmallSize>& llvm::SmallPtrSet< PtrType, SmallSize >::operator= ( SmallPtrSet< PtrType, SmallSize > &&  RHS)
inline

Definition at line 455 of file SmallPtrSet.h.

◆ operator=() [3/3]

template<class PtrType, unsigned SmallSize>
SmallPtrSet<PtrType, SmallSize>& llvm::SmallPtrSet< PtrType, SmallSize >::operator= ( std::initializer_list< PtrType >  IL)
inline

Definition at line 462 of file SmallPtrSet.h.

◆ swap()

template<class PtrType, unsigned SmallSize>
void llvm::SmallPtrSet< PtrType, SmallSize >::swap ( SmallPtrSet< PtrType, SmallSize > &  RHS)
inline

swap - Swaps the elements of two sets.

Definition at line 469 of file SmallPtrSet.h.

Referenced by std::swap().


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