summaryrefslogtreecommitdiffstats
path: root/llvm/include/Support/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
commit7f74a56e2436c40b18a672ad7d58727cd6832329 (patch)
tree6a4683a53f7eb71b8a3425008ef21268c2b2c8fd /llvm/include/Support/HashExtras.h
parent850d4f6af1a0e9de3fa6e10afb04e3738fcc5d67 (diff)
downloadbcm5719-llvm-7f74a56e2436c40b18a672ad7d58727cd6832329.tar.gz
bcm5719-llvm-7f74a56e2436c40b18a672ad7d58727cd6832329.zip
Changes to build successfully with GCC 3.02
llvm-svn: 1503
Diffstat (limited to 'llvm/include/Support/HashExtras.h')
-rw-r--r--llvm/include/Support/HashExtras.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/include/Support/HashExtras.h b/llvm/include/Support/HashExtras.h
index 6ea831e78f0..d7e48a3b625 100644
--- a/llvm/include/Support/HashExtras.h
+++ b/llvm/include/Support/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
OpenPOWER on IntegriCloud