diff --git a/include/llvm/Support/HashExtras.h b/include/llvm/Support/HashExtras.h index ecd572e3d9e..6ea831e78f0 100644 --- a/include/llvm/Support/HashExtras.h +++ b/include/llvm/Support/HashExtras.h @@ -19,4 +19,9 @@ template <> struct hash { } }; +// Provide a hash function for arbitrary pointers... +template struct hash { + inline size_t operator()(const T *Val) const { return (size_t)Val; } +}; + #endif