struct FunctionPointerLikeTypeTraits
Declaration
template <int Alignment, typename FunctionPointerT>
struct FunctionPointerLikeTypeTraits { /* full declaration omitted */ };
Description
Provide suitable custom traits struct for function pointers. Function pointers can't be directly given these traits as functions can't have their alignment computed with `alignof` and we need different casting. To rely on higher alignment for a specialized use, you can provide a customized form of this template explicitly with higher alignment, and potentially use alignment attributes on functions to satisfy that.
Declared at: llvm/include/llvm/Support/PointerLikeTypeTraits.h:123
Templates
- int Alignment
- FunctionPointerT
Method Overview
- public static inline void * getAsVoidPointer(FunctionPointerT P)
- public static inline FunctionPointerT getFromVoidPointer(void * P)
Methods
¶static inline void* getAsVoidPointer(
FunctionPointerT P)
static inline void* getAsVoidPointer(
FunctionPointerT P)
Declared at: llvm/include/llvm/Support/PointerLikeTypeTraits.h:125
Parameters
- FunctionPointerT P
¶static inline FunctionPointerT getFromVoidPointer(
void* P)
static inline FunctionPointerT getFromVoidPointer(
void* P)
Declared at: llvm/include/llvm/Support/PointerLikeTypeTraits.h:131
Parameters
- void* P