LLVM: llvm::SmallVectorBase< Size_T > Class Template Reference (original) (raw)

This is all the stuff common to all SmallVectors. More...

#include "[llvm/ADT/SmallVector.h](SmallVector%5F8h%5Fsource.html)"

Protected Member Functions
SmallVectorBase ()=delete
SmallVectorBase (void *FirstEl, size_t TotalCapacity)
LLVM_ABI void * mallocForGrow (void *FirstEl, size_t MinSize, size_t TSize, size_t &NewCapacity)
This is a helper for grow() that's out of line to reduce code duplication.
LLVM_ABI void grow_pod (void *FirstEl, size_t MinSize, size_t TSize)
This is an implementation of the grow() method which only works on POD-like data types and is out of line to reduce code duplication.
void set_size (size_t N)
Set the array size to N, which the current array must have enough capacity for.
void set_allocation_range (void *Begin, size_t N)
Set the array data pointer to Begin and capacity to N.
Static Protected Member Functions
static constexpr size_t SizeTypeMax ()
The maximum value of the Size_T used.
Protected Attributes
void * BeginX
Size_T Size = 0
Size_T Capacity

template<class Size_T>
class llvm::SmallVectorBase< Size_T >

This is all the stuff common to all SmallVectors.

The template parameter specifies the type which should be used to hold the Size and Capacity of the SmallVector, so it can be adjusted. Using 32 bit size is desirable to shrink the size of the SmallVector. Using 64 bit size is desirable for cases like SmallVector, where a 32 bit size would limit the vector to ~4GB. SmallVectors are used for buffering bitcode output - which can exceed 4GB.

Definition at line 54 of file SmallVector.h.

SmallVectorBase() [2/2]

capacity()

empty()

grow_pod()

template<class Size_T>

void SmallVectorBase::grow_pod ( void * FirstEl, size_t MinSize, size_t TSize ) protected

mallocForGrow()

template<class Size_T>

void * SmallVectorBase::mallocForGrow ( void * FirstEl, size_t MinSize, size_t TSize, size_t & NewCapacity ) protected

set_allocation_range()

Set the array data pointer to Begin and capacity to N.

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

Definition at line 99 of file SmallVector.h.

Referenced by grow_pod().

set_size()

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.

Definition at line 90 of file SmallVector.h.

size()

SizeTypeMax()

BeginX

Capacity

Size


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