LLVM  6.0.0svn
Classes | Public Member Functions | Static Public Member Functions | Friends | List of all members
llvm::TrailingObjects< BaseTy, TrailingTys > Class Template Reference

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

#include "llvm/Support/TrailingObjects.h"

Inheritance diagram for llvm::TrailingObjects< BaseTy, TrailingTys >:
Inheritance graph
[legend]
Collaboration diagram for llvm::TrailingObjects< BaseTy, TrailingTys >:
Collaboration graph
[legend]

Classes

struct  FixedSizeStorage
 A type where its ::with_counts template member has a ::type member suitable for use as uninitialized storage for an object with the given trailing object counts. More...
 
class  FixedSizeStorageOwner
 A type that acts as the owner for an object placed into fixed storage. More...
 

Public Member Functions

template<typename T >
const TgetTrailingObjects () const
 Returns a pointer to the trailing object array of the given type (which must be one of those specified in the class template). More...
 
template<typename T >
TgetTrailingObjects ()
 Returns a pointer to the trailing object array of the given type (which must be one of those specified in the class template). More...
 

Static Public Member Functions

template<typename... Tys>
static constexpr std::enable_if< std::is_same< Foo< TrailingTys... >, Foo< Tys... > >::value, size_t >::type additionalSizeToAlloc (typename trailing_objects_internal::ExtractSecondType< TrailingTys, size_t >::type... Counts)
 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). More...
 
template<typename... Tys>
static constexpr std::enable_if< std::is_same< Foo< TrailingTys... >, Foo< Tys... > >::value, size_t >::type totalSizeToAlloc (typename trailing_objects_internal::ExtractSecondType< TrailingTys, size_t >::type... Counts)
 Returns the total size of an object if it were allocated with the given trailing object counts. More...
 

Friends

template<int A, typename B , typename T , typename P , typename... M>
class trailing_objects_internal::TrailingObjectsImpl
 

Detailed Description

template<typename BaseTy, typename... TrailingTys>
class llvm::TrailingObjects< BaseTy, TrailingTys >

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

Definition at line 234 of file TrailingObjects.h.

Member Function Documentation

◆ additionalSizeToAlloc()

template<typename BaseTy, typename... TrailingTys>
template<typename... Tys>
static constexpr std::enable_if< std::is_same<Foo<TrailingTys...>, Foo<Tys...> >::value, size_t>::type llvm::TrailingObjects< BaseTy, TrailingTys >::additionalSizeToAlloc ( typename trailing_objects_internal::ExtractSecondType< TrailingTys, size_t >::type...  Counts)
inlinestatic

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.

Definition at line 338 of file TrailingObjects.h.

◆ getTrailingObjects() [1/2]

template<typename BaseTy, typename... TrailingTys>
template<typename T >
const T* llvm::TrailingObjects< BaseTy, TrailingTys >::getTrailingObjects ( ) const
inline

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.

Definition at line 309 of file TrailingObjects.h.

Referenced by llvm::BitsInit::get(), llvm::ListInit::get(), and llvm::DagInit::get().

◆ getTrailingObjects() [2/2]

template<typename BaseTy, typename... TrailingTys>
template<typename T >
T* llvm::TrailingObjects< BaseTy, TrailingTys >::getTrailingObjects ( )
inline

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.

Definition at line 321 of file TrailingObjects.h.

◆ totalSizeToAlloc()

template<typename BaseTy, typename... TrailingTys>
template<typename... Tys>
static constexpr std::enable_if< std::is_same<Foo<TrailingTys...>, Foo<Tys...> >::value, size_t>::type llvm::TrailingObjects< BaseTy, TrailingTys >::totalSizeToAlloc ( typename trailing_objects_internal::ExtractSecondType< TrailingTys, size_t >::type...  Counts)
inlinestatic

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.

Definition at line 350 of file TrailingObjects.h.

Friends And Related Function Documentation

◆ trailing_objects_internal::TrailingObjectsImpl

template<typename BaseTy, typename... TrailingTys>
template<int A, typename B , typename T , typename P , typename... M>
friend class trailing_objects_internal::TrailingObjectsImpl
friend

Definition at line 241 of file TrailingObjects.h.


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