class TrailingObjects

Declaration

template <typename BaseTy, typename... TrailingTys>
class TrailingObjects { /* full declaration omitted */ };

Description

See the file comment for details on the usage of the TrailingObjects type.

Declared at: llvm/include/llvm/Support/TrailingObjects.h:212

Templates

BaseTy
TrailingTys

Method Overview

Methods

TrailingObjects<BaseTy, TrailingTys...>()

Declared at: llvm/include/llvm/Support/TrailingObjects.h:331

TrailingObjects<BaseTy, TrailingTys...>(
    const TrailingObjects<BaseTy,
                          TrailingTys...>&)

Declared at: llvm/include/llvm/Support/TrailingObjects.h:332

Parameters

const TrailingObjects<BaseTy, TrailingTys...>&

TrailingObjects<BaseTy, TrailingTys...>(
    TrailingObjects<BaseTy, TrailingTys...>&&)

Declared at: llvm/include/llvm/Support/TrailingObjects.h:333

Parameters

TrailingObjects<BaseTy, TrailingTys...>&&

template <typename... Tys>
static constexpr std::enable_if_t<
    std::is_same<Foo<TrailingTys...>,
                 Foo<Tys...>>::value,
    size_t>
additionalSizeToAlloc(
    typename trailing_objects_internal::
        ExtractSecondType<TrailingTys,
                          size_t>::type... Counts)

Description

Returns the size of the trailing data, if an object were allocated with the given counts (The counts are in the same order as the template arguments). This does not include the size of the base object. The template arguments must be the same as those used in the class; they are supplied here redundantly only so that it's clear what the counts are counting in callers.

Declared at: llvm/include/llvm/Support/TrailingObjects.h:314

Templates

Tys

Parameters

typename trailing_objects_internal:: ExtractSecondType<TrailingTys, size_t>::type... Counts

static size_t callNumTrailingObjects(
    const BaseTy* Obj,
    TrailingObjectsBase::OverloadToken<BaseTy>)

Declared at: llvm/include/llvm/Support/TrailingObjects.h:260

Parameters

const BaseTy* Obj
TrailingObjectsBase::OverloadToken<BaseTy>

template <typename T>
static size_t callNumTrailingObjects(
    const BaseTy* Obj,
    TrailingObjectsBase::OverloadToken<T>)

Declared at: llvm/include/llvm/Support/TrailingObjects.h:266

Templates

T

Parameters

const BaseTy* Obj
TrailingObjectsBase::OverloadToken<T>

template <typename T>
const T* getTrailingObjects() const

Description

Returns a pointer to the trailing object array of the given type (which must be one of those specified in the class template). The array may have zero or more elements in it.

Declared at: llvm/include/llvm/Support/TrailingObjects.h:285

Templates

T

template <typename T>
T* getTrailingObjects()

Description

Returns a pointer to the trailing object array of the given type (which must be one of those specified in the class template). The array may have zero or more elements in it.

Declared at: llvm/include/llvm/Support/TrailingObjects.h:297

Templates

T

static const BaseTy* getTrailingObjectsImpl(
    const BaseTy* Obj,
    TrailingObjectsBase::OverloadToken<BaseTy>)

Declared at: llvm/include/llvm/Support/TrailingObjects.h:241

Parameters

const BaseTy* Obj
TrailingObjectsBase::OverloadToken<BaseTy>

static BaseTy* getTrailingObjectsImpl(
    BaseTy* Obj,
    TrailingObjectsBase::OverloadToken<BaseTy>)

Declared at: llvm/include/llvm/Support/TrailingObjects.h:247

Parameters

BaseTy* Obj
TrailingObjectsBase::OverloadToken<BaseTy>

template <typename... Tys>
static constexpr std::enable_if_t<
    std::is_same<Foo<TrailingTys...>,
                 Foo<Tys...>>::value,
    size_t>
totalSizeToAlloc(
    typename trailing_objects_internal::
        ExtractSecondType<TrailingTys,
                          size_t>::type... Counts)

Description

Returns the total size of an object if it were allocated with the given trailing object counts. This is the same as additionalSizeToAlloc, except it *does* include the size of the base object.

Declared at: llvm/include/llvm/Support/TrailingObjects.h:326

Templates

Tys

Parameters

typename trailing_objects_internal:: ExtractSecondType<TrailingTys, size_t>::type... Counts

static void verifyTrailingObjectsAssertions()

Declared at: llvm/include/llvm/Support/TrailingObjects.h:235