diff options
-rw-r--r-- | include/llvm/Support/HashExtras.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/Support/HashExtras.h b/include/llvm/Support/HashExtras.h index ecd572e3d9..6ea831e78f 100644 --- a/include/llvm/Support/HashExtras.h +++ b/include/llvm/Support/HashExtras.h @@ -19,4 +19,9 @@ template <> struct hash<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; } +}; + #endif |