Added a pointer hash function object for use in pointer maps.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Vikram S. Adve 2001-07-28 04:41:10 +00:00
parent 8b6821732e
commit bf2b7e8beb

View File

@ -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 #endif