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.
25 /// PointerIntPair - This class implements a pair of a pointer and small
32 /// Note that PointerIntPair always puts the Int part in the highest bits
33 /// possible. For example, PointerIntPair<void*, 1, bool> will put the bit for
36 /// PointerIntPair<PointerIntPair<void*, 1, bool>, 1, bool>
41 class PointerIntPair {
59 PointerIntPair() : Value(0) {}
60 PointerIntPair(PointerTy Ptr, IntType Int) : Value(0) {
62 "PointerIntPair formed with integer size too large for pointer");
104 static PointerIntPair getFromOpaqueValue(void *V) {
105 PointerIntPair P; P.setFromOpaqueValue(V); return P;
108 bool operator==(const PointerIntPair &RHS) const {return Value == RHS.Value;}
109 bool operator!=(const PointerIntPair &RHS) const {return Value != RHS.Value;}
110 bool operator<(const PointerIntPair &RHS) const {return Value < RHS.Value;}
111 bool operator>(const PointerIntPair &RHS) const {return Value > RHS.Value;}
112 bool operator<=(const PointerIntPair &RHS) const {return Value <= RHS.Value;}
113 bool operator>=(const PointerIntPair &RHS) const {return Value >= RHS.Value;}
118 struct isPodLike<PointerIntPair<PointerTy, IntBits, IntType> > {
122 // Provide specialization of DenseMapInfo for PointerIntPair.
124 struct DenseMapInfo<PointerIntPair<PointerTy, IntBits, IntType> > {
125 typedef PointerIntPair<PointerTy, IntBits, IntType> Ty;
143 // Teach SmallPtrSet that PointerIntPair is "basically a pointer".
146 class PointerLikeTypeTraits<PointerIntPair<PointerTy, IntBits, IntType,
150 getAsVoidPointer(const PointerIntPair<PointerTy, IntBits, IntType> &P) {
153 static inline PointerIntPair<PointerTy, IntBits, IntType>
155 return PointerIntPair<PointerTy, IntBits, IntType>::getFromOpaqueValue(P);