aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/ADT
diff options
context:
space:
mode:
authorJeff Cohen <jeffc@jolt-lang.org>2005-03-16 05:49:06 +0000
committerJeff Cohen <jeffc@jolt-lang.org>2005-03-16 05:49:06 +0000
commit4d1b4458fe58298a397631f37532d2fd4f451bd4 (patch)
tree9c05cbeda4c1ef54568fd5009d500a38194a5c9b /include/llvm/ADT
parentfd678243862d499e6a4d980ea6a75ce2d0c3a9c5 (diff)
downloadexternal_llvm-4d1b4458fe58298a397631f37532d2fd4f451bd4.zip
external_llvm-4d1b4458fe58298a397631f37532d2fd4f451bd4.tar.gz
external_llvm-4d1b4458fe58298a397631f37532d2fd4f451bd4.tar.bz2
Don't provide default hash struct instantiation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20639 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT')
-rw-r--r--include/llvm/ADT/hash_map.in15
1 files changed, 9 insertions, 6 deletions
diff --git a/include/llvm/ADT/hash_map.in b/include/llvm/ADT/hash_map.in
index 1681b9c..9d2d792 100644
--- a/include/llvm/ADT/hash_map.in
+++ b/include/llvm/ADT/hash_map.in
@@ -106,20 +106,21 @@ using HASH_NAMESPACE::hash;
// out specializations like stl_bvector.h, causing link conflicts.
#include <vector>
-#include "llvm/ADT/HashExtras.h"
-
#ifdef _MSC_VER
// GCC and VC++ have differing ways of implementing hash_maps. As it's not
// standardized, that's to be expected. This adapter class allows VC++
// hash_map to use GCC's hash classes.
namespace stdext {
- template<class Key> struct hash {
- inline size_t operator()(const Key &) const {
- return 0;
+ template<class Key> struct hash;
+
+ // Provide a hash function for unsigned ints...
+ template<> struct hash<unsigned int> {
+ inline size_t operator()(unsigned int Val) const {
+ return Val;
}
};
-
+
template<class Key> class hash_compare<Key, std::less<Key> > {
std::less<Key> comp;
public:
@@ -134,4 +135,6 @@ namespace stdext {
#endif
+#include "llvm/ADT/HashExtras.h"
+
#endif