class PointerIntPair
Declaration
template <typename PointerTy,
unsigned int IntBits,
typename IntType = unsigned int,
typename PtrTraits = PointerLikeTypeTraits<PointerTy>,
typename Info =
PointerIntPairInfo<PointerTy, IntBits, PtrTraits>>
class PointerIntPair { /* full declaration omitted */ };
Description
PointerIntPair - This class implements a pair of a pointer and small integer. It is designed to represent this in the space required by one pointer by bitmangling the integer into the low part of the pointer. This can only be done for small integers: typically up to 3 bits, but it depends on the number of bits available according to PointerLikeTypeTraits for the type. Note that PointerIntPair always puts the IntVal part in the highest bits possible. For example, PointerIntPair <void *, 1, bool> will put the bit for the bool into bit #2, not bit #0, which allows the low two bits to be used for something else. For example, this allows: PointerIntPair <PointerIntPair <void *, 1, bool>, 1, bool> ... and the two bools will land in different bits.
Declared at: llvm/include/llvm/ADT/PointerIntPair.h:45
Templates
- PointerTy
- unsigned int IntBits
- IntType = unsigned int
- PtrTraits = PointerLikeTypeTraits<PointerTy>
- Info = PointerIntPairInfo<PointerTy, IntBits, PtrTraits>
Method Overview
- public PointerIntPair<PointerTy, IntBits, IntType, PtrTraits, Info>()
- public PointerIntPair<PointerTy, IntBits, IntType, PtrTraits, Info>(PointerTy PtrVal, IntType IntVal)
- public PointerIntPair<PointerTy, IntBits, IntType, PtrTraits, Info>(PointerTy PtrVal)
- public const PointerTy * getAddrOfPointer() const
- public PointerTy * getAddrOfPointer()
- public static PointerIntPair<PointerTy, IntBits, IntType, PtrTraits, Info> getFromOpaqueValue(void * V)
- public static PointerIntPair<PointerTy, IntBits, IntType, PtrTraits, Info> getFromOpaqueValue(const void * V)
- public IntType getInt() const
- public void * getOpaqueValue() const
- public PointerTy getPointer() const
- public void initWithPointer(PointerTy PtrVal) &
- public void setFromOpaqueValue(void * Val) &
- public void setInt(IntType IntVal) &
- public void setPointer(PointerTy PtrVal) &
- public void setPointerAndInt(PointerTy PtrVal, IntType IntVal) &
Methods
¶PointerIntPair<PointerTy,
IntBits,
IntType,
PtrTraits,
Info>()
PointerIntPair<PointerTy,
IntBits,
IntType,
PtrTraits,
Info>()
Declared at: llvm/include/llvm/ADT/PointerIntPair.h:51
¶PointerIntPair<PointerTy,
IntBits,
IntType,
PtrTraits,
Info>(PointerTy PtrVal,
IntType IntVal)
PointerIntPair<PointerTy,
IntBits,
IntType,
PtrTraits,
Info>(PointerTy PtrVal,
IntType IntVal)
Declared at: llvm/include/llvm/ADT/PointerIntPair.h:53
Parameters
- PointerTy PtrVal
- IntType IntVal
¶PointerIntPair<PointerTy,
IntBits,
IntType,
PtrTraits,
Info>(PointerTy PtrVal)
PointerIntPair<PointerTy,
IntBits,
IntType,
PtrTraits,
Info>(PointerTy PtrVal)
Declared at: llvm/include/llvm/ADT/PointerIntPair.h:57
Parameters
- PointerTy PtrVal
¶const PointerTy* getAddrOfPointer() const
const PointerTy* getAddrOfPointer() const
Declared at: llvm/include/llvm/ADT/PointerIntPair.h:80
¶PointerTy* getAddrOfPointer()
PointerTy* getAddrOfPointer()
Declared at: llvm/include/llvm/ADT/PointerIntPair.h:84
¶static PointerIntPair<PointerTy,
IntBits,
IntType,
PtrTraits,
Info>
getFromOpaqueValue(void* V)
static PointerIntPair<PointerTy,
IntBits,
IntType,
PtrTraits,
Info>
getFromOpaqueValue(void* V)
Declared at: llvm/include/llvm/ADT/PointerIntPair.h:97
Parameters
- void* V
¶static PointerIntPair<PointerTy,
IntBits,
IntType,
PtrTraits,
Info>
getFromOpaqueValue(const void* V)
static PointerIntPair<PointerTy,
IntBits,
IntType,
PtrTraits,
Info>
getFromOpaqueValue(const void* V)
Declared at: llvm/include/llvm/ADT/PointerIntPair.h:105
Parameters
- const void* V
¶IntType getInt() const
IntType getInt() const
Declared at: llvm/include/llvm/ADT/PointerIntPair.h:61
¶void* getOpaqueValue() const
void* getOpaqueValue() const
Declared at: llvm/include/llvm/ADT/PointerIntPair.h:91
¶PointerTy getPointer() const
PointerTy getPointer() const
Declared at: llvm/include/llvm/ADT/PointerIntPair.h:59
¶void initWithPointer(PointerTy PtrVal) &
void initWithPointer(PointerTy PtrVal) &
Declared at: llvm/include/llvm/ADT/PointerIntPair.h:71
Parameters
- PointerTy PtrVal
¶void setFromOpaqueValue(void* Val) &
void setFromOpaqueValue(void* Val) &
Declared at: llvm/include/llvm/ADT/PointerIntPair.h:93
Parameters
- void* Val
¶void setInt(IntType IntVal) &
void setInt(IntType IntVal) &
Declared at: llvm/include/llvm/ADT/PointerIntPair.h:67
Parameters
- IntType IntVal
¶void setPointer(PointerTy PtrVal) &
void setPointer(PointerTy PtrVal) &
Declared at: llvm/include/llvm/ADT/PointerIntPair.h:63
Parameters
- PointerTy PtrVal
¶void setPointerAndInt(PointerTy PtrVal,
IntType IntVal) &
void setPointerAndInt(PointerTy PtrVal,
IntType IntVal) &
Declared at: llvm/include/llvm/ADT/PointerIntPair.h:75
Parameters
- PointerTy PtrVal
- IntType IntVal