This is all the stuff common to all SmallVectors.

Synopsis

Declared in <llvm/ADT/SmallVector.h>

template<class Size_T>
class SmallVectorBase;

Description

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<char>, where a 32 bit size would limit the vector to ~4GB. SmallVectors are used for buffering bitcode output ‐ which can exceed 4GB.

Member Functions

Name

Description

capacity

Return the number of elements the vector can hold without reallocating.

empty

Return true if the vector contains no elements.

size

Return the number of elements in the vector.

Protected Member Functions

Name

Description

SmallVectorBase [constructor]

Constructors

grow_pod

Grow POD‐like storage to hold at least MinSize elements.

mallocForGrow

This is a helper for grow() that's out of line to reduce code duplication. This function will report a fatal error if it can't grow at least to MinSize.

set_allocation_range

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

set_size

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

Protected Static Member Functions

Name

Description

SizeTypeMax

The maximum value of the Size_T used.

Protected Data Members

Name

Description

BeginX

Pointer to the first element, or inline storage.

Capacity

Number of elements the current storage can hold without reallocating.

Size

Number of constructed elements currently stored.

Derived Classes

Name

Description

SmallVectorTemplateCommon

Common SmallVector functionality independent of whether T is POD.

Created with MrDocs