summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit82f87e63e83dc4311bb66d3866574b212059edc9 (patch)
tree9fbfd3a788d309c9f2d38ad494364aacaec070f2 /llvm/include/Support/HashExtras.h
parent27b10bc781aa9b4aff622bdd1411fec56b064f7c (diff)
downloadbcm5719-llvm-82f87e63e83dc4311bb66d3866574b212059edc9.tar.gz
bcm5719-llvm-82f87e63e83dc4311bb66d3866574b212059edc9.zip
Fixes for PR114: Thanks to Reid Spencer!
llvm-svn: 10029
Diffstat (limited to 'llvm/include/Support/HashExtras.h')
-rw-r--r--llvm/include/Support/HashExtras.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/include/Support/HashExtras.h b/llvm/include/Support/HashExtras.h
index 871080c4675..67f65b5f3ac 100644
--- a/llvm/include/Support/HashExtras.h
+++ b/llvm/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
OpenPOWER on IntegriCloud