LLVM 22.0.0git
llvm::detail::UniqueFunctionBase< ReturnT, ParamTs > Class Template Reference

#include "llvm/ADT/FunctionExtras.h"

Inheritance diagram for llvm::detail::UniqueFunctionBase< ReturnT, ParamTs >:
[legend]

Classes

struct  AdjustedParamTBase
struct  AdjustedParamTBase< T & >
struct  AdjustedParamTBase< T && >
struct  CallbacksHolder
struct  CalledAs
struct  NonTrivialCallbacks
 A struct we use to aggregate three callbacks when we need full set of operations. More...
union  StorageUnionT
struct  TrivialCallback
 A struct to hold a single trivial callback with sufficient alignment for our bitpacking. More...

Public Member Functions

 operator bool () const

Protected Types

template<typename T>
using AdjustedParamT = typename AdjustedParamTBase<T>::type
using CallPtrT
using MovePtrT = void (*)(void *LHSCallableAddr, void *RHSCallableAddr)
using DestroyPtrT = void (*)(void *CallableAddr)
using CallbackPointerUnionT

Protected Member Functions

bool isInlineStorage () const
bool isTrivialCallback () const
CallPtrT getTrivialCallback () const
NonTrivialCallbacksgetNonTrivialCallbacks () const
CallPtrT getCallPtr () const
void * getCalleePtr () const
void * getInlineStorage () const
void * getOutOfLineStorage () const
size_t getOutOfLineStorageSize () const
size_t getOutOfLineStorageAlignment () const
void setOutOfLineStorage (void *Ptr, size_t Size, size_t Alignment)
template<typename CallableT, typename CalledAsT>
 UniqueFunctionBase (CallableT Callable, CalledAs< CalledAsT >)
 ~UniqueFunctionBase ()
 UniqueFunctionBase (UniqueFunctionBase &&RHS) noexcept
UniqueFunctionBaseoperator= (UniqueFunctionBase &&RHS) noexcept
 UniqueFunctionBase ()=default

Static Protected Member Functions

template<typename CalledAsT>
static ReturnT CallImpl (void *CallableAddr, AdjustedParamT< ParamTs >... Params)
template<typename CallableT>
static void MoveImpl (void *LHSCallableAddr, void *RHSCallableAddr) noexcept
template<typename CallableT>
static void DestroyImpl (void *CallableAddr) noexcept

Protected Attributes

union llvm::detail::UniqueFunctionBase::StorageUnionT StorageUnion
PointerIntPair< CallbackPointerUnionT, 1, boolCallbackAndInlineFlag

Static Protected Attributes

static constexpr size_t InlineStorageSize = sizeof(void *) * 3
static constexpr size_t InlineStorageAlign = alignof(void *)

Detailed Description

template<typename ReturnT, typename... ParamTs>
class llvm::detail::UniqueFunctionBase< ReturnT, ParamTs >

Definition at line 76 of file FunctionExtras.h.

Member Typedef Documentation

◆ AdjustedParamT

template<typename ReturnT, typename... ParamTs>
template<typename T>
using llvm::detail::UniqueFunctionBase< ReturnT, ParamTs >::AdjustedParamT = typename AdjustedParamTBase<T>::type
protected

Definition at line 109 of file FunctionExtras.h.

◆ CallbackPointerUnionT

template<typename ReturnT, typename... ParamTs>
using llvm::detail::UniqueFunctionBase< ReturnT, ParamTs >::CallbackPointerUnionT
protected
Initial value:
A discriminated union of two or more pointer types, with the discriminator in the low bit of the poin...

Definition at line 135 of file FunctionExtras.h.

◆ CallPtrT

template<typename ReturnT, typename... ParamTs>
using llvm::detail::UniqueFunctionBase< ReturnT, ParamTs >::CallPtrT
protected
Initial value:
ReturnT (*)(void *CallableAddr,
typename AdjustedParamTBase< T >::type AdjustedParamT

Definition at line 113 of file FunctionExtras.h.

◆ DestroyPtrT

template<typename ReturnT, typename... ParamTs>
using llvm::detail::UniqueFunctionBase< ReturnT, ParamTs >::DestroyPtrT = void (*)(void *CallableAddr)
protected

Definition at line 116 of file FunctionExtras.h.

◆ MovePtrT

template<typename ReturnT, typename... ParamTs>
using llvm::detail::UniqueFunctionBase< ReturnT, ParamTs >::MovePtrT = void (*)(void *LHSCallableAddr, void *RHSCallableAddr)
protected

Definition at line 115 of file FunctionExtras.h.

Constructor & Destructor Documentation

◆ UniqueFunctionBase() [1/3]

template<typename ReturnT, typename... ParamTs>
template<typename CallableT, typename CalledAsT>
llvm::detail::UniqueFunctionBase< ReturnT, ParamTs >::UniqueFunctionBase ( CallableT Callable,
CalledAs< CalledAsT >  )
inlineprotected

Definition at line 254 of file FunctionExtras.h.

◆ ~UniqueFunctionBase()

template<typename ReturnT, typename... ParamTs>
llvm::detail::UniqueFunctionBase< ReturnT, ParamTs >::~UniqueFunctionBase ( )
inlineprotected

◆ UniqueFunctionBase() [2/3]

template<typename ReturnT, typename... ParamTs>
llvm::detail::UniqueFunctionBase< ReturnT, ParamTs >::UniqueFunctionBase ( UniqueFunctionBase< ReturnT, ParamTs > && RHS)
inlineprotectednoexcept

Definition at line 290 of file FunctionExtras.h.

◆ UniqueFunctionBase() [3/3]

template<typename ReturnT, typename... ParamTs>
llvm::detail::UniqueFunctionBase< ReturnT, ParamTs >::UniqueFunctionBase ( )
protecteddefault

Member Function Documentation

◆ CallImpl()

template<typename ReturnT, typename... ParamTs>
template<typename CalledAsT>
ReturnT llvm::detail::UniqueFunctionBase< ReturnT, ParamTs >::CallImpl ( void * CallableAddr,
AdjustedParamT< ParamTs >... Params )
inlinestaticprotected

Definition at line 210 of file FunctionExtras.h.

◆ DestroyImpl()

template<typename ReturnT, typename... ParamTs>
template<typename CallableT>
void llvm::detail::UniqueFunctionBase< ReturnT, ParamTs >::DestroyImpl ( void * CallableAddr)
inlinestaticprotectednoexcept

Definition at line 223 of file FunctionExtras.h.

◆ getCalleePtr()

template<typename ReturnT, typename... ParamTs>
void * llvm::detail::UniqueFunctionBase< ReturnT, ParamTs >::getCalleePtr ( ) const
inlineprotected

Definition at line 190 of file FunctionExtras.h.

◆ getCallPtr()

template<typename ReturnT, typename... ParamTs>
CallPtrT llvm::detail::UniqueFunctionBase< ReturnT, ParamTs >::getCallPtr ( ) const
inlineprotected

Definition at line 179 of file FunctionExtras.h.

◆ getInlineStorage()

◆ getNonTrivialCallbacks()

template<typename ReturnT, typename... ParamTs>
NonTrivialCallbacks * llvm::detail::UniqueFunctionBase< ReturnT, ParamTs >::getNonTrivialCallbacks ( ) const
inlineprotected

◆ getOutOfLineStorage()

template<typename ReturnT, typename... ParamTs>
void * llvm::detail::UniqueFunctionBase< ReturnT, ParamTs >::getOutOfLineStorage ( ) const
inlineprotected

◆ getOutOfLineStorageAlignment()

template<typename ReturnT, typename... ParamTs>
size_t llvm::detail::UniqueFunctionBase< ReturnT, ParamTs >::getOutOfLineStorageAlignment ( ) const
inlineprotected

◆ getOutOfLineStorageSize()

template<typename ReturnT, typename... ParamTs>
size_t llvm::detail::UniqueFunctionBase< ReturnT, ParamTs >::getOutOfLineStorageSize ( ) const
inlineprotected

◆ getTrivialCallback()

template<typename ReturnT, typename... ParamTs>
CallPtrT llvm::detail::UniqueFunctionBase< ReturnT, ParamTs >::getTrivialCallback ( ) const
inlineprotected

◆ isInlineStorage()

template<typename ReturnT, typename... ParamTs>
bool llvm::detail::UniqueFunctionBase< ReturnT, ParamTs >::isInlineStorage ( ) const
inlineprotected

◆ isTrivialCallback()

template<typename ReturnT, typename... ParamTs>
bool llvm::detail::UniqueFunctionBase< ReturnT, ParamTs >::isTrivialCallback ( ) const
inlineprotected

◆ MoveImpl()

template<typename ReturnT, typename... ParamTs>
template<typename CallableT>
void llvm::detail::UniqueFunctionBase< ReturnT, ParamTs >::MoveImpl ( void * LHSCallableAddr,
void * RHSCallableAddr )
inlinestaticprotectednoexcept

Definition at line 217 of file FunctionExtras.h.

◆ operator bool()

template<typename ReturnT, typename... ParamTs>
llvm::detail::UniqueFunctionBase< ReturnT, ParamTs >::operator bool ( ) const
inlineexplicit

Definition at line 337 of file FunctionExtras.h.

◆ operator=()

template<typename ReturnT, typename... ParamTs>
UniqueFunctionBase & llvm::detail::UniqueFunctionBase< ReturnT, ParamTs >::operator= ( UniqueFunctionBase< ReturnT, ParamTs > && RHS)
inlineprotectednoexcept

Definition at line 322 of file FunctionExtras.h.

◆ setOutOfLineStorage()

template<typename ReturnT, typename... ParamTs>
void llvm::detail::UniqueFunctionBase< ReturnT, ParamTs >::setOutOfLineStorage ( void * Ptr,
size_t Size,
size_t Alignment )
inlineprotected

Member Data Documentation

◆ CallbackAndInlineFlag

template<typename ReturnT, typename... ParamTs>
PointerIntPair<CallbackPointerUnionT, 1, bool> llvm::detail::UniqueFunctionBase< ReturnT, ParamTs >::CallbackAndInlineFlag
protected

Definition at line 163 of file FunctionExtras.h.

◆ InlineStorageAlign

template<typename ReturnT, typename... ParamTs>
size_t llvm::detail::UniqueFunctionBase< ReturnT, ParamTs >::InlineStorageAlign = alignof(void *)
staticconstexprprotected

Definition at line 79 of file FunctionExtras.h.

◆ InlineStorageSize

template<typename ReturnT, typename... ParamTs>
size_t llvm::detail::UniqueFunctionBase< ReturnT, ParamTs >::InlineStorageSize = sizeof(void *) * 3
staticconstexprprotected

Definition at line 78 of file FunctionExtras.h.

◆ StorageUnion

template<typename ReturnT, typename... ParamTs>
union llvm::detail::UniqueFunctionBase::StorageUnionT llvm::detail::UniqueFunctionBase< ReturnT, ParamTs >::StorageUnion
protected

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