llvm::SmallSetVector

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

Synopsis

Declared in <llvm/ADT/SetVector.h>

template<
    typename T,
    unsigned int N>
class SmallSetVector
    : public SetVector<T, SmallVector<T, N>, DenseSet<T>, N>

Base Classes

NameDescription
SetVector<T, SmallVector<T, N>, DenseSet<T>, N>A vector that has set insertion semantics.

Type Aliases

NameDescription
const_iterator Const iterator over elements in insertion order.
const_reference Const reference to a stored element.
const_reverse_iterator Const reverse iterator over elements in insertion order.
iterator Iterator over elements in insertion order (const; mutation is via SetVector APIs).
key_type Key type used by the uniqueness set.
reference Mutable reference to a stored element.
reverse_iterator Reverse iterator over elements in insertion order.
set_type Underlying set type used for uniqueness.
size_type Unsigned size type for the SetVector.
value_type Element type stored in insertion order.
vector_type Underlying vector type used for insertion order.

Member Functions

NameDescription
back Return the last element of the SetVector.
begin begin overloads
clear Completely clear the SetVector
contains Check if the SetVector contains the given key.
count Count the number of elements of a given key in the SetVector.
empty Determine if the SetVector is empty or not.
end end overloads
erase Erase a single element from the set vector.
front Return the first element of the SetVector.
getArrayRef Return the underlying vector as an ArrayRef preserving insertion order.
insert insert overloads
insert_range Insert every element of range R, preserving first-seen order.
operator[] Index into the SetVector.
pop_back Remove the last element of the SetVector.
pop_back_val Remove and return the last element.
rbegin rbegin overloads
remove Remove an item from the set vector.
remove_if Remove items from the set vector based on a predicate function.
rend rend overloads
reserve Reserve space in the SetVector if supported by the underlying containers.
set_subtract Compute This := This - S.
set_union Compute the set union of this SetVector with S.
size Determine the number of elements in the SetVector.
swap Exchange contents with RHS.
takeVector Clear the SetVector and return the underlying vector.
operator== Return true if both SetVectors contain the same elements in order.
operator!= Return true if the SetVectors differ in content or order.

Using Declarations

NameDescription
Unnamed using Inherit constructors from SetVector.

Non-Member Functions

NameDescription
promoteLoopAccessesToScalarsPromote must-alias loop memory accesses to scalars via load/store motion.