diff options
Diffstat (limited to 'gcc/cp/cp-tree.h')
-rw-r--r-- | gcc/cp/cp-tree.h | 21 |
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. */ |