[cfe-commits] r42253 - /cfe/trunk/include/clang/Analysis/DataflowValues.h
Chris Lattner
sabre at nondot.org
Sun Sep 23 16:53:07 PDT 2007
Author: lattner
Date: Sun Sep 23 18:53:07 2007
New Revision: 42253
URL: http://llvm.org/viewvc/llvm-project?rev=42253&view=rev
Log:
Fix for 64-bit systems.
Modified:
cfe/trunk/include/clang/Analysis/DataflowValues.h
Modified: cfe/trunk/include/clang/Analysis/DataflowValues.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/DataflowValues.h?rev=42253&r1=42252&r2=42253&view=diff
==============================================================================
--- cfe/trunk/include/clang/Analysis/DataflowValues.h (original)
+++ cfe/trunk/include/clang/Analysis/DataflowValues.h Sun Sep 23 18:53:07 2007
@@ -37,10 +37,10 @@
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,
More information about the cfe-commits
mailing list