Template Class SmallVectorImpl

Inheritance Relationships

Base Type

Derived Types

Class Documentation

template<typename T>
class SmallVectorImpl : public llvm_vecsmall::SmallVectorTemplateBase<T, IsPod<T>::value>

This class consists of common code factored out of the SmallVector class to reduce code duplication based on the SmallVector ‘N’ template parameter.

Subclassed by llvm_vecsmall::SmallVector< uint16_t, 4 >, llvm_vecsmall::SmallVector< KeySuffix, 2 >, llvm_vecsmall::SmallVector< int, 2 >, llvm_vecsmall::SmallVector< MemberScope, 8 >, llvm_vecsmall::SmallVector< T, N >

Public Types

typedef SuperClass::iterator iterator
typedef SuperClass::const_iterator const_iterator
typedef SuperClass::size_type size_type

Public Functions

inline ~SmallVectorImpl()
inline void clear()
inline void resize(size_type N)
inline void resize(size_type N, const T &NV)
inline void reserve(size_type N)
inline LLVM_VECSMALL_NODISCARD T pop_back_val ()
void swap(SmallVectorImpl &RHS)
template<typename in_iter>
inline void append(in_iter in_start, in_iter in_end)

Add the specified range to the end of the SmallVector.

inline void append(size_type NumInputs, const T &Elt)

Add the specified range to the end of the SmallVector.

inline void append(std::initializer_list<T> IL)
inline void assign(size_type NumElts, const T &Elt)
inline void assign(std::initializer_list<T> IL)
inline iterator erase(const_iterator CI)
inline iterator erase(const_iterator CS, const_iterator CE)
inline iterator insert(iterator I, T &&Elt)
inline iterator insert(iterator I, const T &Elt)
inline iterator insert(iterator I, size_type NumToInsert, const T &Elt)
template<typename ItTy>
inline iterator insert(iterator I, ItTy From, ItTy To)
inline void insert(iterator I, std::initializer_list<T> IL)
template<typename ...ArgTypes>
inline void emplace_back(ArgTypes&&... Args)
SmallVectorImpl &operator=(const SmallVectorImpl &RHS)
SmallVectorImpl &operator=(SmallVectorImpl &&RHS)
inline bool operator==(const SmallVectorImpl &RHS) const
inline bool operator!=(const SmallVectorImpl &RHS) const
inline bool operator<(const SmallVectorImpl &RHS) const
inline void set_size(size_type N)

Set the array size to N, which the current array must have enough capacity for.

This does not construct or destroy any elements in the vector.

Clients can use this in conjunction with capacity() to write past the end of the buffer when they know that more elements are available, and only update the size later. This avoids the cost of value initializing elements which will only be overwritten.

Protected Functions

inline explicit SmallVectorImpl(unsigned N)