From bf2b7e8beb4f7f38a68b1e2d6831bd024f2a379c Mon Sep 17 00:00:00 2001 From: "Vikram S. Adve" Date: Sat, 28 Jul 2001 04:41:10 +0000 Subject: [PATCH] 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 --- include/llvm/Support/HashExtras.h | 5 +++++ 1 file changed, 5 insertions(+) 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 -- 2.34.1