]> granicus.if.org Git - clang/commitdiff
Fix for 64-bit systems.
authorChris Lattner <sabre@nondot.org>
Sun, 23 Sep 2007 23:53:07 +0000 (23:53 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 23 Sep 2007 23:53:07 +0000 (23:53 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42253 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Analysis/DataflowValues.h

index 95ee094153a5cfa59cf4e5f04c67d9eda0652754..1d778645b254b121223eff25b13675ae78416f5b 100644 (file)
@@ -37,10 +37,10 @@ namespace llvm {
     static unsigned getHashValue(const clang::CFG::Edge& E) {
       const clang::CFGBlock* P1 = E.getSrc();
       const clang::CFGBlock* P2 = E.getDst();  
-      return (reinterpret_cast<unsigned>(P1) >> 4) ^
-      (reinterpret_cast<unsigned>(P1) >> 9) ^
-      (reinterpret_cast<unsigned>(P2) >> 5) ^
-      (reinterpret_cast<unsigned>(P2) >> 10);
+      return static_cast<unsigned>((reinterpret_cast<uintptr_t>(P1) >> 4) ^
+                                   (reinterpret_cast<uintptr_t>(P1) >> 9) ^
+                                   (reinterpret_cast<uintptr_t>(P2) >> 5) ^
+                                   (reinterpret_cast<uintptr_t>(P2) >> 10));
     }
     
     static bool isEqual(const clang::CFG::Edge& LHS,