projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b68217
)
Added a pointer hash function object for use in pointer maps.
author
Vikram S. Adve
<vadve@cs.uiuc.edu>
Sat, 28 Jul 2001 04:41:10 +0000
(
04:41
+0000)
committer
Vikram S. Adve
<vadve@cs.uiuc.edu>
Sat, 28 Jul 2001 04:41:10 +0000
(
04:41
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/Support/HashExtras.h
patch
|
blob
|
history
diff --git
a/include/llvm/Support/HashExtras.h
b/include/llvm/Support/HashExtras.h
index ecd572e3d9e5eca1fabceb143e4666dd0cad07c6..6ea831e78f0d6fe77fca702dcd556a4be249263d 100644
(file)
--- a/
include/llvm/Support/HashExtras.h
+++ b/
include/llvm/Support/HashExtras.h
@@
-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