[llvm-commits] [llvm] r42737 - /llvm/trunk/include/llvm/ADT/DenseMap.h

Chris Lattner sabre at nondot.org
Sun Oct 7 10:57:11 PDT 2007


Author: lattner
Date: Sun Oct  7 12:57:10 2007
New Revision: 42737

URL: http://llvm.org/viewvc/llvm-project?rev=42737&view=rev
Log:
Finish off PR1723, by working around some strange compiler bug.

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

Modified: llvm/trunk/include/llvm/ADT/DenseMap.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/DenseMap.h?rev=42737&r1=42736&r2=42737&view=diff

==============================================================================
--- llvm/trunk/include/llvm/ADT/DenseMap.h (original)
+++ llvm/trunk/include/llvm/ADT/DenseMap.h Sun Oct  7 12:57:10 2007
@@ -36,8 +36,8 @@
   static inline T* getEmptyKey() { return reinterpret_cast<T*>(-1); }
   static inline T* getTombstoneKey() { return reinterpret_cast<T*>(-2); }
   static unsigned getHashValue(const T *PtrVal) {
-    return (unsigned(uintptr_t(PtrVal)) >> 4) ^ 
-           (unsigned(uintptr_t(PtrVal)) >> 9);
+    return (unsigned((uintptr_t)PtrVal) >> 4) ^ 
+           (unsigned((uintptr_t)PtrVal) >> 9);
   }
   static bool isEqual(const T *LHS, const T *RHS) { return LHS == RHS; }
   static bool isPod() { return true; }





More information about the llvm-commits mailing list