[llvm-commits] [llvm] r60303 - /llvm/trunk/include/llvm/ADT/PointerIntPair.h

Chris Lattner sabre at nondot.org
Sun Nov 30 11:10:42 PST 2008


Author: lattner
Date: Sun Nov 30 13:10:41 2008
New Revision: 60303

URL: http://llvm.org/viewvc/llvm-project?rev=60303&view=rev
Log:
add the rest of the comparison routines.

Modified:
    llvm/trunk/include/llvm/ADT/PointerIntPair.h

Modified: llvm/trunk/include/llvm/ADT/PointerIntPair.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/PointerIntPair.h?rev=60303&r1=60302&r2=60303&view=diff

==============================================================================
--- llvm/trunk/include/llvm/ADT/PointerIntPair.h (original)
+++ llvm/trunk/include/llvm/ADT/PointerIntPair.h Sun Nov 30 13:10:41 2008
@@ -60,12 +60,12 @@
   void *getOpaqueValue() const { return reinterpret_cast<void*>(Value); }
   void setFromOpaqueValue(void *Val) { Value = reinterpret_cast<intptr_t>(Val);}
   
-  bool operator==(const PointerIntPair &RHS) const {
-    return Value == RHS.Value;
-  }
-  bool operator!=(const PointerIntPair &RHS) const {
-    return Value != RHS.Value;
-  }
+  bool operator==(const PointerIntPair &RHS) const {return Value == RHS.Value;}
+  bool operator!=(const PointerIntPair &RHS) const {return Value != RHS.Value;}
+  bool operator<(const PointerIntPair &RHS) const {return Value < RHS.Value;}
+  bool operator>(const PointerIntPair &RHS) const {return Value > RHS.Value;}
+  bool operator<=(const PointerIntPair &RHS) const {return Value <= RHS.Value;}
+  bool operator>=(const PointerIntPair &RHS) const {return Value >= RHS.Value;}
 };
 
 // Provide specialization of DenseMapInfo for PointerIntPair.





More information about the llvm-commits mailing list