aboutsummaryrefslogtreecommitdiffstats
path: root/include/Support/HashExtras.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-11-16 20:21:15 +0000
committerChris Lattner <sabre@nondot.org>2003-11-16 20:21:15 +0000
commit8b70b78ba489b090d9866e6a4084ab1e8613b527 (patch)
treec3e137b779b119b92587950176b457381132b18f /include/Support/HashExtras.h
parentf3b2410bc4c098c0f27f689c797a539d6ef8a09e (diff)
downloadexternal_llvm-8b70b78ba489b090d9866e6a4084ab1e8613b527.zip
external_llvm-8b70b78ba489b090d9866e6a4084ab1e8613b527.tar.gz
external_llvm-8b70b78ba489b090d9866e6a4084ab1e8613b527.tar.bz2
Fixes for PR114: Thanks to Reid Spencer!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10029 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/Support/HashExtras.h')
-rw-r--r--include/Support/HashExtras.h4
1 files changed, 3 insertions, 1 deletions
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 @@ template <> struct hash<std::string> {
// 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