From: Vikram S. Adve Date: Sat, 28 Jul 2001 04:41:10 +0000 (+0000) Subject: Added a pointer hash function object for use in pointer maps. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=bf2b7e8beb4f7f38a68b1e2d6831bd024f2a379c;p=oota-llvm.git 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 --- 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