LLVM 17.0.0git
Public Member Functions | List of all members
llvm::SmallSetVector< T, N > Class Template Reference

A SetVector that performs no allocations if smaller than a certain size. More...

#include "llvm/ADT/SetVector.h"

Inheritance diagram for llvm::SmallSetVector< T, N >:
Inheritance graph
[legend]
Collaboration diagram for llvm::SmallSetVector< T, N >:
Collaboration graph
[legend]

Public Member Functions

 SmallSetVector ()=default
 
template<typename It >
 SmallSetVector (It Start, It End)
 Initialize a SmallSetVector with a range of elements.
 
- Public Member Functions inherited from llvm::SetVector< T, SmallVector< T, N >, SmallDenseSet< T, N > >
 SetVector ()=default
 Construct an empty SetVector.
 
 SetVector (It Start, It End)
 Initialize a SetVector with a range of elements.
 
ArrayRef< TgetArrayRef () const
 
SmallVector< T, NtakeVector ()
 Clear the SetVector and return the underlying vector.
 
bool empty () const
 Determine if the SetVector is empty or not.
 
size_type size () const
 Determine the number of elements in the SetVector.
 
iterator begin ()
 Get an iterator to the beginning of the SetVector.
 
const_iterator begin () const
 Get a const_iterator to the beginning of the SetVector.
 
iterator end ()
 Get an iterator to the end of the SetVector.
 
const_iterator end () const
 Get a const_iterator to the end of the SetVector.
 
reverse_iterator rbegin ()
 Get an reverse_iterator to the end of the SetVector.
 
const_reverse_iterator rbegin () const
 Get a const_reverse_iterator to the end of the SetVector.
 
reverse_iterator rend ()
 Get a reverse_iterator to the beginning of the SetVector.
 
const_reverse_iterator rend () const
 Get a const_reverse_iterator to the beginning of the SetVector.
 
const Tfront () const
 Return the first element of the SetVector.
 
const Tback () const
 Return the last element of the SetVector.
 
const_reference operator[] (size_type n) const
 Index into the SetVector.
 
bool insert (const value_type &X)
 Insert a new element into the SetVector.
 
void insert (It Start, It End)
 Insert a range of elements into the SetVector.
 
bool remove (const value_type &X)
 Remove an item from the set vector.
 
iterator erase (const_iterator I)
 Erase a single element from the set vector.
 
bool remove_if (UnaryPredicate P)
 Remove items from the set vector based on a predicate function.
 
bool contains (const key_type &key) const
 Check if the SetVector contains the given key.
 
size_type count (const key_type &key) const
 Count the number of elements of a given key in the SetVector.
 
void clear ()
 Completely clear the SetVector.
 
void pop_back ()
 Remove the last element of the SetVector.
 
T pop_back_val ()
 
bool operator== (const SetVector &that) const
 
bool operator!= (const SetVector &that) const
 
bool set_union (const STy &S)
 Compute This := This u S, return whether 'This' changed.
 
void set_subtract (const STy &S)
 Compute This := This - B TODO: We should be able to use set_subtract from SetOperations.h, but SetVector interface is inconsistent with DenseSet.
 
void swap (SetVector< T, SmallVector< T, N >, SmallDenseSet< T, N > > &RHS)
 

Additional Inherited Members

- Public Types inherited from llvm::SetVector< T, SmallVector< T, N >, SmallDenseSet< T, N > >
using value_type = T
 
using key_type = T
 
using reference = T &
 
using const_reference = const T &
 
using set_type = SmallDenseSet< T, N >
 
using vector_type = SmallVector< T, N >
 
using iterator = typename vector_type::const_iterator
 
using const_iterator = typename vector_type::const_iterator
 
using reverse_iterator = typename vector_type::const_reverse_iterator
 
using const_reverse_iterator = typename vector_type::const_reverse_iterator
 
using size_type = typename vector_type::size_type
 

Detailed Description

template<typename T, unsigned N>
class llvm::SmallSetVector< T, N >

A SetVector that performs no allocations if smaller than a certain size.

Definition at line 300 of file SetVector.h.

Constructor & Destructor Documentation

◆ SmallSetVector() [1/2]

template<typename T , unsigned N>
llvm::SmallSetVector< T, N >::SmallSetVector ( )
default

◆ SmallSetVector() [2/2]

template<typename T , unsigned N>
template<typename It >
llvm::SmallSetVector< T, N >::SmallSetVector ( It  Start,
It  End 
)
inline

Initialize a SmallSetVector with a range of elements.

Definition at line 307 of file SetVector.h.

References llvm::SetVector< T, SmallVector< T, N >, SmallDenseSet< T, N > >::insert().


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