LLVM 22.0.0git
llvm::SmallSet< PointeeType *, N > Class Template Reference

If this set is of pointer values, transparently switch over to using SmallPtrSet for performance. More...

#include "llvm/ADT/SmallSet.h"

Inheritance diagram for llvm::SmallSet< PointeeType *, N >:
[legend]

Public Types

using key_type
using size_type
using value_type
using const_iterator
Public Types inherited from llvm::SmallPtrSetImpl< PointeeType * >
using iterator
using const_iterator
using key_type
using value_type
Public Types inherited from llvm::SmallPtrSetImplBase
using size_type = unsigned

Public Member Functions

 SmallSet ()=default
SmallSetoperator= (const SmallSet &)=default
bool empty () const
size_type size () const
size_type count (const PointeeType *&V) const
 count - Return 1 if the element is in the set, 0 otherwise.
std::pair< const_iterator, boolinsert (const PointeeType *&V)
 insert - Insert an element into the set if it isn't already there.
void insert_range (Range &&R)
bool erase (const PointeeType *&V)
void clear ()
const_iterator begin () const
const_iterator end () const
bool contains (const PointeeType *&V) const
 Check if the SmallSet contains the given element.
Public Member Functions inherited from llvm::SmallPtrSet< PointeeType *, N >
 SmallPtrSet ()
SmallPtrSet< PointeeType *, SmallSize > & operator= (const SmallPtrSet< PointeeType *, SmallSize > &RHS)
void swap (SmallPtrSet< PointeeType *, SmallSize > &RHS)
 swap - Swaps the elements of two sets.
Public Member Functions inherited from llvm::SmallPtrSetImpl< PointeeType * >
 SmallPtrSetImpl (const SmallPtrSetImpl &)=delete
std::pair< iterator, boolinsert (PointeeType *Ptr)
 Inserts Ptr if and only if there is no element in the container equal to Ptr.
bool erase (PointeeType *Ptr)
 Remove pointer from the set.
bool remove_if (UnaryPredicate P)
 Remove elements that match the given predicate.
size_type count (ConstPtrType Ptr) const
 count - Return 1 if the specified pointer is in the set, 0 otherwise.
iterator find (ConstPtrType Ptr) const
bool contains (ConstPtrType Ptr) const
void insert_range (Range &&R)
iterator begin () const
iterator end () const
Public Member Functions inherited from llvm::SmallPtrSetImplBase
SmallPtrSetImplBaseoperator= (const SmallPtrSetImplBase &)=delete
bool empty () const
size_type size () const
size_type capacity () const
void clear ()
void reserve (size_type NewNumEntries)
Public Member Functions inherited from llvm::DebugEpochBase
void incrementEpoch ()

Additional Inherited Members

Protected Member Functions inherited from llvm::SmallPtrSetImpl< PointeeType * >
LLVM_ABI SmallPtrSetImplBase (const void **SmallStorage, const SmallPtrSetImplBase &that)
LLVM_ABI SmallPtrSetImplBase (const void **SmallStorage, unsigned SmallSize, const void **RHSSmallStorage, SmallPtrSetImplBase &&that)
 SmallPtrSetImplBase (const void **SmallStorage, unsigned SmallSize)
Protected Member Functions inherited from llvm::SmallPtrSetImplBase
LLVM_ABI SmallPtrSetImplBase (const void **SmallStorage, const SmallPtrSetImplBase &that)
LLVM_ABI SmallPtrSetImplBase (const void **SmallStorage, unsigned SmallSize, const void **RHSSmallStorage, SmallPtrSetImplBase &&that)
 SmallPtrSetImplBase (const void **SmallStorage, unsigned SmallSize)
 ~SmallPtrSetImplBase ()
const void ** EndPointer () const
iterator_range< const void ** > small_buckets ()
iterator_range< const void *const * > small_buckets () const
iterator_range< const void ** > buckets ()
iterator_range< const void *const * > buckets () 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.
bool erase_imp (const void *Ptr)
 erase_imp - If the set contains the specified pointer, remove it and return true, otherwise return false.
const void *constfind_imp (const void *Ptr) const
 Returns the raw pointer needed to construct an iterator.
bool contains_imp (const void *Ptr) const
bool isSmall () const
LLVM_ABI void swap (const void **SmallStorage, const void **RHSSmallStorage, SmallPtrSetImplBase &RHS)
 swap - Swaps the elements of two sets.
LLVM_ABI void copyFrom (const void **SmallStorage, const SmallPtrSetImplBase &RHS)
LLVM_ABI void moveFrom (const void **SmallStorage, unsigned SmallSize, const void **RHSSmallStorage, SmallPtrSetImplBase &&RHS)
Static Protected Member Functions inherited from llvm::SmallPtrSetImplBase
static void * getTombstoneMarker ()
static void * getEmptyMarker ()
Protected Attributes inherited from llvm::SmallPtrSetImplBase
const void ** CurArray
 The current set of buckets, in either small or big representation.
unsigned CurArraySize
 CurArraySize - The allocated size of CurArray, always a power of two.
unsigned NumEntries
 Number of elements in CurArray that contain a value.
unsigned NumTombstones
 Number of tombstones in CurArray.
bool IsSmall
 Whether the set is in small representation.

Detailed Description

template<typename PointeeType, unsigned N>
class llvm::SmallSet< PointeeType *, N >

If this set is of pointer values, transparently switch over to using SmallPtrSet for performance.

Definition at line 273 of file SmallSet.h.

Member Typedef Documentation

◆ const_iterator

using llvm::SmallSet< PointeeType *, N, std::less<PointeeType *> >::const_iterator

Definition at line 149 of file SmallSet.h.

◆ key_type

using llvm::SmallSet< PointeeType *, N, std::less<PointeeType *> >::key_type

Definition at line 146 of file SmallSet.h.

◆ size_type

using llvm::SmallSet< PointeeType *, N, std::less<PointeeType *> >::size_type

Definition at line 147 of file SmallSet.h.

◆ value_type

using llvm::SmallSet< PointeeType *, N, std::less<PointeeType *> >::value_type

Definition at line 148 of file SmallSet.h.

Constructor & Destructor Documentation

◆ SmallSet()

llvm::SmallSet< PointeeType *, N, std::less<PointeeType *> >::SmallSet ( )
default

Member Function Documentation

◆ begin()

const_iterator llvm::SmallSet< PointeeType *, N, std::less<PointeeType *> >::begin ( ) const
inlinenodiscard

Definition at line 215 of file SmallSet.h.

◆ clear()

void llvm::SmallSet< PointeeType *, N, std::less<PointeeType *> >::clear ( )
inline

Definition at line 210 of file SmallSet.h.

◆ contains()

bool llvm::SmallSet< PointeeType *, N, std::less<PointeeType *> >::contains ( const PointeeType * & V) const
inlinenodiscard

Check if the SmallSet contains the given element.

Definition at line 228 of file SmallSet.h.

◆ count()

size_type llvm::SmallSet< PointeeType *, N, std::less<PointeeType *> >::count ( const PointeeType * & V) const
inlinenodiscard

count - Return 1 if the element is in the set, 0 otherwise.

Definition at line 175 of file SmallSet.h.

◆ empty()

bool llvm::SmallSet< PointeeType *, N, std::less<PointeeType *> >::empty ( ) const
inlinenodiscard

Definition at line 168 of file SmallSet.h.

◆ end()

const_iterator llvm::SmallSet< PointeeType *, N, std::less<PointeeType *> >::end ( ) const
inlinenodiscard

Definition at line 221 of file SmallSet.h.

◆ erase()

bool llvm::SmallSet< PointeeType *, N, std::less<PointeeType *> >::erase ( const PointeeType * & V)
inline

Definition at line 199 of file SmallSet.h.

◆ insert()

std::pair< const_iterator, bool > llvm::SmallSet< PointeeType *, N, std::less<PointeeType *> >::insert ( const PointeeType * & V)
inline

insert - Insert an element into the set if it isn't already there.

Returns a pair. The first value of it is an iterator to the inserted element or the existing element in the set. The second value is true if the element is inserted (it was not in the set before).

Definition at line 183 of file SmallSet.h.

◆ insert_range()

void llvm::SmallSet< PointeeType *, N, std::less<PointeeType *> >::insert_range ( Range && R)
inline

Definition at line 195 of file SmallSet.h.

◆ operator=()

SmallSet & llvm::SmallSet< PointeeType *, N, std::less<PointeeType *> >::operator= ( const SmallSet< PointeeType *, N > & )
default

◆ size()

size_type llvm::SmallSet< PointeeType *, N, std::less<PointeeType *> >::size ( ) const
inlinenodiscard

Definition at line 170 of file SmallSet.h.


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