aboutsummaryrefslogtreecommitdiff
path: root/gold/gold.h
diff options
context:
space:
mode:
Diffstat (limited to 'gold/gold.h')
-rw-r--r--gold/gold.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/gold/gold.h b/gold/gold.h
index a377f96..4c23aa6 100644
--- a/gold/gold.h
+++ b/gold/gold.h
@@ -75,6 +75,8 @@
#define Unordered_set std::tr1::unordered_set
#define Unordered_map std::tr1::unordered_map
+#define reserve_unordered_map(map, n) ((map)->rehash(n))
+
#elif defined(HAVE_EXT_HASH_MAP) && defined(HAVE_EXT_HASH_SET)
#include <ext/hash_map>
@@ -105,6 +107,8 @@ struct hash<T*>
}
+#define reserve_unordered_map(map, n) ((map)->resize(n))
+
#else
// The fallback is to just use set and map.
@@ -115,6 +119,8 @@ struct hash<T*>
#define Unordered_set std::set
#define Unordered_map std::map
+#define reserve_unordered_map(map, n)
+
#endif
#ifndef HAVE_PREAD