class SmallVectorBase

Declaration

class SmallVectorBase { /* full declaration omitted */ };

Description

This is all the non-templated stuff common to all SmallVectors.

Declared at: llvm/include/llvm/ADT/SmallVector.h:38

Member Variables

protected void* BeginX
protected unsigned int Size = 0
protected unsigned int Capacity

Method Overview

Methods

SmallVectorBase()

Declared at: llvm/include/llvm/ADT/SmallVector.h:43

SmallVectorBase(void* FirstEl,
                size_t TotalCapacity)

Declared at: llvm/include/llvm/ADT/SmallVector.h:44

Parameters

void* FirstEl
size_t TotalCapacity

size_t capacity() const

Declared at: llvm/include/llvm/ADT/SmallVector.h:53

bool empty() const

Declared at: llvm/include/llvm/ADT/SmallVector.h:55

void grow_pod(void* FirstEl,
              size_t MinCapacity,
              size_t TSize)

Description

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.

Declared at: llvm/include/llvm/ADT/SmallVector.h:49

Parameters

void* FirstEl
size_t MinCapacity
size_t TSize

void set_size(size_t N)

Description

Set the array size to \p 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.

Declared at: llvm/include/llvm/ADT/SmallVector.h:66

Parameters

size_t N

size_t size() const

Declared at: llvm/include/llvm/ADT/SmallVector.h:52