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.

Synopsis

Declared in <llvm/ADT/SmallVector.h>

void*
mallocForGrow(
    void* FirstEl,
    size_t MinSize,
    size_t TSize,
    size_t& NewCapacity);

Return Value

Pointer to the newly allocated storage.

Parameters

Name

Description

FirstEl

Pointer to the first element of current storage.

MinSize

Minimum number of elements the new allocation must hold.

TSize

Size in bytes of each element.

NewCapacity

Set to the capacity of the new allocation.

Created with MrDocs