LLVM 22.0.0git
llvm::PointerLikeTypeTraits< void * > Struct Reference

#include "llvm/Support/PointerLikeTypeTraits.h"

Inheritance diagram for llvm::PointerLikeTypeTraits< void * >:
[legend]

Static Public Member Functions

static void * getAsVoidPointer (void *P)
static void * getFromVoidPointer (void *P)

Static Public Attributes

static constexpr int NumLowBitsAvailable = 2
 Note, we assume here that void* is related to raw malloc'ed memory and that malloc returns objects at least 4-byte aligned.

Detailed Description

Definition at line 57 of file PointerLikeTypeTraits.h.

Member Function Documentation

◆ getAsVoidPointer()

void * llvm::PointerLikeTypeTraits< void * >::getAsVoidPointer ( void * P)
inlinestatic

Definition at line 58 of file PointerLikeTypeTraits.h.

References P.

◆ getFromVoidPointer()

void * llvm::PointerLikeTypeTraits< void * >::getFromVoidPointer ( void * P)
inlinestatic

Definition at line 59 of file PointerLikeTypeTraits.h.

References P.

Member Data Documentation

◆ NumLowBitsAvailable

int llvm::PointerLikeTypeTraits< void * >::NumLowBitsAvailable = 2
staticconstexpr

Note, we assume here that void* is related to raw malloc'ed memory and that malloc returns objects at least 4-byte aligned.

However, this may be wrong, or pointers may be from something other than malloc. In this case, you should specify a real typed pointer or avoid this template.

All clients should use assertions to do a run-time check to ensure that this is actually true.

Definition at line 68 of file PointerLikeTypeTraits.h.


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