// forked from gcc/cp/lex.cc conv_type_hasher
/* Hasher for the conversion operator name hash table. */
-struct conv_type_hasher : ggc_ptr_hash<tree_node>
+struct rust_conv_type_hasher : ggc_ptr_hash<tree_node>
{
/* Hash NODE, an identifier node in the table. TYPE_UID is
suitable, as we're not concerned about matching canonicalness
static bool equal (tree node, tree type) { return TREE_TYPE (node) == type; }
};
-static GTY (()) hash_table<conv_type_hasher> *conv_type_names;
+static GTY (()) hash_table<rust_conv_type_hasher> *conv_type_names;
// forked from gcc/cp/lex.cc make_conv_op_name
return error_mark_node;
if (conv_type_names == NULL)
- conv_type_names = hash_table<conv_type_hasher>::create_ggc (31);
+ conv_type_names = hash_table<rust_conv_type_hasher>::create_ggc (31);
tree *slot
= conv_type_names->find_slot_with_hash (type, (hashval_t) TYPE_UID (type),
// forked from gcc/cp/tree.cc cplus_array_hasher
-struct cplus_array_hasher : ggc_ptr_hash<tree_node>
+struct rust_cplus_array_hasher : ggc_ptr_hash<tree_node>
{
typedef cplus_array_info *compare_type;
/* Hash an ARRAY_TYPE. K is really of type `tree'. */
hashval_t
-cplus_array_hasher::hash (tree t)
+rust_cplus_array_hasher::hash (tree t)
{
hashval_t hash;
of type `cplus_array_info*'. */
bool
-cplus_array_hasher::equal (tree t1, cplus_array_info *t2)
+rust_cplus_array_hasher::equal (tree t1, cplus_array_info *t2)
{
return (TREE_TYPE (t1) == t2->type && TYPE_DOMAIN (t1) == t2->domain);
}
/* Hash table containing dependent array types, which are unsuitable for
the language-independent type hash table. */
-static GTY (()) hash_table<cplus_array_hasher> *cplus_array_htab;
+static GTY (()) hash_table<rust_cplus_array_hasher> *cplus_array_htab;
// forked from gcc/cp/tree.cc is_byte_access_type
hashval_t hash;
if (cplus_array_htab == NULL)
- cplus_array_htab = hash_table<cplus_array_hasher>::create_ggc (61);
+ cplus_array_htab = hash_table<rust_cplus_array_hasher>::create_ggc (61);
hash = TYPE_UID (elt_type);
if (index_type)
/* Traits class for function start hash maps below. */
-struct source_location_table_entry_hash
+struct rust_source_location_table_entry_hash
: ggc_remove<source_location_table_entry>
{
typedef source_location_table_entry value_type;
};
static GTY (())
- hash_table<source_location_table_entry_hash> *source_location_table;
+ hash_table<rust_source_location_table_entry_hash> *source_location_table;
static GTY (()) unsigned int source_location_id;
// Above is forked from gcc/cp/cp-gimplify.cc
return build_zero_cst (const_ptr_type_node);
if (source_location_table == NULL)
source_location_table
- = hash_table<source_location_table_entry_hash>::create_ggc (64);
+ = hash_table<rust_source_location_table_entry_hash>::create_ggc (64);
const line_map_ordinary *map;
source_location_table_entry entry;
entry.loc = linemap_resolve_location (line_table, loc,
/* hash traits for declarations. Hashes potential overload sets via
DECL_NAME. */
-struct named_decl_hash : ggc_remove<tree>
+struct rust_named_decl_hash : ggc_remove<tree>
{
typedef tree value_type; /* A DECL or OVERLOAD */
typedef tree compare_type; /* An identifier. */
/* Datatype used to temporarily save C++ bindings (for implicit
instantiations purposes and like). Implemented in decl.cc. */
-struct GTY (()) cxx_saved_binding
+struct GTY (()) rust_cxx_saved_binding
{
/* The name of the current binding. */
tree identifier;
struct GTY (()) saved_scope
{
- vec<cxx_saved_binding, va_gc> *old_bindings;
+ vec<rust_cxx_saved_binding, va_gc> *old_bindings;
tree old_namespace;
vec<tree, va_gc> *decl_ns_list;
tree class_name;
struct named_label_entry; /* Defined in decl.cc. */
-struct named_label_hash : ggc_remove<named_label_entry *>
+struct rust_named_label_hash : ggc_remove<named_label_entry *>
{
typedef named_label_entry *value_type;
typedef tree compare_type; /* An identifier. */
BOOL_BITFIELD invalid_constexpr : 1;
BOOL_BITFIELD throwing_cleanup : 1;
- hash_table<named_label_hash> *x_named_labels;
+ hash_table<rust_named_label_hash> *x_named_labels;
/* Tracking possibly infinite loops. This is a vec<tree> only because
vec<bool> doesn't work with gtype. */
/* Hash table of bound decls. It'd be nice to have this inline, but
as the hash_map has a dtor, we can't then put this struct into a
union (until moving to c++11). */
- hash_table<named_decl_hash> *bindings;
+ hash_table<rust_named_decl_hash> *bindings;
};
// forked from gcc/cp/cp-tree.h lang_decl_parm
// forked from gcc/cp/cp-tree.h treee_pair_s
-struct GTY (()) tree_pair_s
+struct GTY (()) rust_tree_pair_s
{
tree purpose;
tree value;
// forked from gcc/cp/cp-tree.h tree_pair_p
-typedef tree_pair_s *tree_pair_p;
+typedef rust_tree_pair_s *rust_tree_pair_p;
// forked from gcc/cp/cp-tree.h lang_type
unsigned dummy : 3;
tree primary_base;
- vec<tree_pair_s, va_gc> *vcall_indices;
+ vec<rust_tree_pair_s, va_gc> *vcall_indices;
tree vtables;
tree typeinfo_var;
vec<tree, va_gc> *vbases;