gcc/
* tree-hash-traits.h (tree_hash): New class.
* except.c: Include tree-hash-traits.h.
(tree_hash_traits): Use tree_hash.
From-SVN: r224970
+2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
+
+ * tree-hash-traits.h (tree_hash): New class.
+ * except.c: Include tree-hash-traits.h.
+ (tree_hash_traits): Use tree_hash.
+
2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
* tree-hash-traits.h (tree_ssa_name_hasher): New class.
#include "tree-pass.h"
#include "cfgloop.h"
#include "builtins.h"
+#include "tree-hash-traits.h"
static GTY(()) int call_site_base;
-struct tree_hash_traits : default_hashmap_traits
-{
- static hashval_t hash (tree t) { return TREE_HASH (t); }
-};
-
+struct tree_hash_traits : simple_hashmap_traits <tree_hash> {};
static GTY (()) hash_map<tree, tree, tree_hash_traits> *type_to_runtime_map;
/* Describe the SjLj_Function_Context structure. */
return SSA_NAME_VERSION (t);
}
+/* Hasher for general trees, based on their TREE_HASH. */
+struct tree_hash : ggc_ptr_hash <tree_node>
+{
+ static hashval_t hash (tree);
+};
+
+inline hashval_t
+tree_hash::hash (tree t)
+{
+ return TREE_HASH (t);
+}
+
#endif