aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/ADT/HashExtras.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-01-20 22:54:45 +0000
committerChris Lattner <sabre@nondot.org>2002-01-20 22:54:45 +0000
commit697954c15da58bd8b186dbafdedd8b06db770201 (patch)
treee119a71f09b5c2513c8c270161ae2a858c6f3b96 /include/llvm/ADT/HashExtras.h
parent13c4659220bc78a0a3529f4d9e57546e898088e3 (diff)
downloadexternal_llvm-697954c15da58bd8b186dbafdedd8b06db770201.zip
external_llvm-697954c15da58bd8b186dbafdedd8b06db770201.tar.gz
external_llvm-697954c15da58bd8b186dbafdedd8b06db770201.tar.bz2
Changes to build successfully with GCC 3.02
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1503 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT/HashExtras.h')
-rw-r--r--include/llvm/ADT/HashExtras.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/llvm/ADT/HashExtras.h b/include/llvm/ADT/HashExtras.h
index 6ea831e..d7e48a3 100644
--- a/include/llvm/ADT/HashExtras.h
+++ b/include/llvm/ADT/HashExtras.h
@@ -11,7 +11,10 @@
#define LLVM_SUPPORT_HASHEXTRAS_H
#include <string>
-#include <hash_map>
+#include <ext/hash_map>
+
+// Cannot specialize hash template from outside of the std namespace.
+namespace std {
template <> struct hash<string> {
size_t operator()(string const &str) const {
@@ -24,4 +27,6 @@ template <class T> struct hash<T *> {
inline size_t operator()(const T *Val) const { return (size_t)Val; }
};
+} // End namespace std
+
#endif