Home | History | Annotate | Download | only in ADT

Lines Matching defs:PointerIntPair

1 //===- llvm/ADT/PointerIntPair.h - Pair for pointer and int -----*- C++ -*-===//
10 // This file defines the PointerIntPair class.
29 /// PointerIntPair - This class implements a pair of a pointer and small
36 /// Note that PointerIntPair always puts the IntVal part in the highest bits
37 /// possible. For example, PointerIntPair<void*, 1, bool> will put the bit for
40 /// PointerIntPair<PointerIntPair<void*, 1, bool>, 1, bool>
46 class PointerIntPair {
50 PointerIntPair() : Value(0) {}
51 PointerIntPair(PointerTy PtrVal, IntType IntVal) {
54 explicit PointerIntPair(PointerTy PtrVal) { initWithPointer(PtrVal); }
80 return const_cast<PointerIntPair *>(this)->getAddrOfPointer();
95 static PointerIntPair getFromOpaqueValue(void *V) {
96 PointerIntPair P;
103 static PointerIntPair getFromOpaqueValue(const void *V) {
108 bool operator==(const PointerIntPair &RHS) const {
111 bool operator!=(const PointerIntPair &RHS) const {
114 bool operator<(const PointerIntPair &RHS) const { return Value < RHS.Value; }
115 bool operator>(const PointerIntPair &RHS) const { return Value > RHS.Value; }
116 bool operator<=(const PointerIntPair &RHS) const {
119 bool operator>=(const PointerIntPair &RHS) const {
130 "PointerIntPair with integer size too large for pointer");
176 struct isPodLike<PointerIntPair<PointerTy, IntBits, IntType>> {
180 // Provide specialization of DenseMapInfo for PointerIntPair.
182 struct DenseMapInfo<PointerIntPair<PointerTy, IntBits, IntType>> {
183 typedef PointerIntPair<PointerTy, IntBits, IntType> Ty;
201 // Teach SmallPtrSet that PointerIntPair is "basically a pointer".
205 PointerIntPair<PointerTy, IntBits, IntType, PtrTraits>> {
208 getAsVoidPointer(const PointerIntPair<PointerTy, IntBits, IntType> &P) {
211 static inline PointerIntPair<PointerTy, IntBits, IntType>
213 return PointerIntPair<PointerTy, IntBits, IntType>::getFromOpaqueValue(P);
215 static inline PointerIntPair<PointerTy, IntBits, IntType>
217 return PointerIntPair<PointerTy, IntBits, IntType>::getFromOpaqueValue(P);