aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/cp-tree.h
diff options
context:
space:
mode:
authorTrevor Saunders <tsaunders@mozilla.com>2014-10-12 22:22:53 +0000
committerTrevor Saunders <tbsaunde@gcc.gnu.org>2014-10-12 22:22:53 +0000
commit2a22f99cb12d82712dd93cfef808b1cef543601b (patch)
treec828063f153ceb609ce5c7d44ea9f00391b32950 /gcc/cp/cp-tree.h
parent7b262a51ea2310bdb6cc901de00f04b0e7be0a4e (diff)
downloadgcc-2a22f99cb12d82712dd93cfef808b1cef543601b.zip
gcc-2a22f99cb12d82712dd93cfef808b1cef543601b.tar.gz
gcc-2a22f99cb12d82712dd93cfef808b1cef543601b.tar.bz2
move many gc hashtab to hash_table
gcc/ * asan.c, cfgloop.c, cfgloop.h, cgraph.c, cgraph.h, config/darwin.c, config/m32c/m32c.c, config/mep/mep.c, config/mips/mips.c, config/rs6000/rs6000.c, dwarf2out.c, function.c, function.h, gimple-ssa.h, libfuncs.h, optabs.c, output.h, rtl.h, sese.c, symtab.c, tree-cfg.c, tree-dfa.c, tree-ssa.c, varasm.c: Use hash-table instead of hashtab. * doc/gty.texi (for_user): Document new option. * gengtype.c (create_user_defined_type): Don't try to get a struct for char. (walk_type): Don't error out on for_user option. (write_func_for_structure): Emit user marking routines if requested by for_user option. (write_local_func_for_structure): Likewise. (main): Mark types with for_user option as used. * ggc.h (gt_pch_nx): Add overload for unsigned int. * hash-map.h (hash_map::hash_entry::pch_nx_helper): AddOverloads. * hash-table.h (ggc_hasher): New struct. (hash_table::create_ggc): New function. (gt_pch_nx): New overload for hash_table. java/ * class.c, decl.c, except.c, expr.c, java-tree.h, lang.c: Use hash_table instead of hashtab. objc/ * objc-act.c: use hash_table instead of hashtab. cp/ * cp-gimplify.c, cp-tree.h, decl.c, mangle.c, name-lookup.c, pt.c, semantics.c, tree.c, typeck2.c: Use hash_table instead of hashtab. fortran/ * trans-decl.c, trans.c, trans.h: Use hash_table instead of hashtab. c-family/ * c-common.c: Use hash_table instead of hashtab. From-SVN: r216127
Diffstat (limited to 'gcc/cp/cp-tree.h')
-rw-r--r--gcc/cp/cp-tree.h21
1 files changed, 16 insertions, 5 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 6d720c1..dbbf26d 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -1133,13 +1133,24 @@ struct GTY(()) saved_scope {
extern GTY(()) struct saved_scope *scope_chain;
-struct GTY(()) cxx_int_tree_map {
+struct GTY((for_user)) cxx_int_tree_map {
unsigned int uid;
tree to;
};
-extern unsigned int cxx_int_tree_map_hash (const void *);
-extern int cxx_int_tree_map_eq (const void *, const void *);
+struct cxx_int_tree_map_hasher : ggc_hasher<cxx_int_tree_map *>
+{
+ static hashval_t hash (cxx_int_tree_map *);
+ static bool equal (cxx_int_tree_map *, cxx_int_tree_map *);
+};
+
+struct named_label_entry;
+
+struct named_label_hasher : ggc_hasher<named_label_entry *>
+{
+ static hashval_t hash (named_label_entry *);
+ static bool equal (named_label_entry *, named_label_entry *);
+};
/* Global state pertinent to the current function. */
@@ -1165,13 +1176,13 @@ struct GTY(()) language_function {
/* True if this function can throw an exception. */
BOOL_BITFIELD can_throw : 1;
- htab_t GTY((param_is(struct named_label_entry))) x_named_labels;
+ hash_table<named_label_hasher> *x_named_labels;
cp_binding_level *bindings;
vec<tree, va_gc> *x_local_names;
/* Tracking possibly infinite loops. This is a vec<tree> only because
vec<bool> doesn't work with gtype. */
vec<tree, va_gc> *infinite_loops;
- htab_t GTY((param_is (struct cxx_int_tree_map))) extern_decl_map;
+ hash_table<cxx_int_tree_map_hasher> *extern_decl_map;
};
/* The current C++-specific per-function global variables. */