LLVM 22.0.0git
llvm::PointerIntPairInfo< PointerT, IntBits, PtrTraits > Struct Template Reference

#include "llvm/ADT/PointerIntPair.h"

Public Types

enum  MaskAndShiftConstants : uintptr_t { PointerBitMask = (~(uintptr_t)0) << PtrTraits::NumLowBitsAvailable , IntShift = (uintptr_t)PtrTraits::NumLowBitsAvailable - IntBits , IntMask = ((uintptr_t)1 << IntBits) - 1 , ShiftedIntMask = (uintptr_t)(IntMask << IntShift) }

Static Public Member Functions

static PointerT getPointer (intptr_t Value)
static intptr_t getInt (intptr_t Value)
static intptr_t updatePointer (intptr_t OrigValue, PointerT Ptr)
static intptr_t updateInt (intptr_t OrigValue, intptr_t Int)

Detailed Description

template<typename PointerT, unsigned IntBits, typename PtrTraits>
struct llvm::PointerIntPairInfo< PointerT, IntBits, PtrTraits >

Definition at line 168 of file PointerIntPair.h.

Member Enumeration Documentation

◆ MaskAndShiftConstants

template<typename PointerT, unsigned IntBits, typename PtrTraits>
enum llvm::PointerIntPairInfo::MaskAndShiftConstants : uintptr_t
Enumerator
PointerBitMask 

PointerBitMask - The bits that come from the pointer.

IntShift 

IntShift - The number of low bits that we reserve for other uses, and keep zero.

IntMask 

IntMask - This is the unshifted mask for valid bits of the int type.

ShiftedIntMask 

Definition at line 174 of file PointerIntPair.h.

Member Function Documentation

◆ getInt()

template<typename PointerT, unsigned IntBits, typename PtrTraits>
intptr_t llvm::PointerIntPairInfo< PointerT, IntBits, PtrTraits >::getInt ( intptr_t Value)
inlinestatic

Definition at line 194 of file PointerIntPair.h.

References IntMask, and IntShift.

◆ getPointer()

template<typename PointerT, unsigned IntBits, typename PtrTraits>
PointerT llvm::PointerIntPairInfo< PointerT, IntBits, PtrTraits >::getPointer ( intptr_t Value)
inlinestatic

Definition at line 189 of file PointerIntPair.h.

References PointerBitMask.

◆ updateInt()

template<typename PointerT, unsigned IntBits, typename PtrTraits>
intptr_t llvm::PointerIntPairInfo< PointerT, IntBits, PtrTraits >::updateInt ( intptr_t OrigValue,
intptr_t Int )
inlinestatic

Definition at line 207 of file PointerIntPair.h.

References assert(), Int, IntMask, IntShift, and ShiftedIntMask.

◆ updatePointer()

template<typename PointerT, unsigned IntBits, typename PtrTraits>
intptr_t llvm::PointerIntPairInfo< PointerT, IntBits, PtrTraits >::updatePointer ( intptr_t OrigValue,
PointerT Ptr )
inlinestatic

Definition at line 198 of file PointerIntPair.h.

References assert(), PointerBitMask, and Ptr.


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