Fixes for PR114: Thanks to Reid Spencer!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10029 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/Support/HashExtras.h b/include/Support/HashExtras.h
index 871080c..67f65b5 100644
--- a/include/Support/HashExtras.h
+++ b/include/Support/HashExtras.h
@@ -31,7 +31,9 @@
// Provide a hash function for arbitrary pointers...
template <class T> struct hash<T *> {
- inline size_t operator()(const T *Val) const { return (size_t)Val; }
+ inline size_t operator()(const T *Val) const {
+ return reinterpret_cast<size_t>(Val);
+ }
};
} // End namespace std