summaryrefslogtreecommitdiffstats
path: root/llvm/include/Support/HashExtras.h
diff options
context:
space:
mode:
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