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

llvm-svn: 316
This commit is contained in:
Vikram S. Adve 2001-07-28 04:41:10 +00:00
parent 0f32957dbb
commit 56324d34f7
1 changed files with 5 additions and 0 deletions

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