LLVM 20.0.0git
|
Provide suitable custom traits struct for function pointers. More...
#include "llvm/Support/PointerLikeTypeTraits.h"
Static Public Member Functions | |
static void * | getAsVoidPointer (FunctionPointerT P) |
static FunctionPointerT | getFromVoidPointer (void *P) |
Static Public Attributes | |
static constexpr int | NumLowBitsAvailable |
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.
Definition at line 125 of file PointerLikeTypeTraits.h.
|
inlinestatic |
Definition at line 128 of file PointerLikeTypeTraits.h.
References assert(), llvm::FunctionPointerLikeTypeTraits< Alignment, FunctionPointerT >::NumLowBitsAvailable, and P.
|
inlinestatic |
Definition at line 134 of file PointerLikeTypeTraits.h.
References P.
|
staticconstexpr |
Definition at line 126 of file PointerLikeTypeTraits.h.
Referenced by llvm::FunctionPointerLikeTypeTraits< Alignment, FunctionPointerT >::getAsVoidPointer().