diff options
Diffstat (limited to 'gcc/cp/mangle.c')
-rw-r--r-- | gcc/cp/mangle.c | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c index e23591315c9..8bb26a9902b 100644 --- a/gcc/cp/mangle.c +++ b/gcc/cp/mangle.c @@ -1460,11 +1460,6 @@ write_source_name (tree identifier) { MANGLE_TRACE_TREE ("source-name", identifier); - /* Never write the whole template-id name including the template - arguments; we only want the template name. */ - if (IDENTIFIER_TEMPLATE (identifier)) - identifier = IDENTIFIER_TEMPLATE (identifier); - write_unsigned_number (IDENTIFIER_LENGTH (identifier)); write_identifier (IDENTIFIER_POINTER (identifier)); } @@ -4181,75 +4176,6 @@ mangle_thunk (tree fn_decl, const int this_adjusting, tree fixed_offset, return result; } -struct conv_type_hasher : ggc_ptr_hash<tree_node> -{ - static hashval_t hash (tree); - static bool equal (tree, tree); -}; - -/* This hash table maps TYPEs to the IDENTIFIER for a conversion - operator to TYPE. The nodes are IDENTIFIERs whose TREE_TYPE is the - TYPE. */ - -static GTY (()) hash_table<conv_type_hasher> *conv_type_names; - -/* Hash a node (VAL1) in the table. */ - -hashval_t -conv_type_hasher::hash (tree val) -{ - return (hashval_t) TYPE_UID (TREE_TYPE (val)); -} - -/* Compare VAL1 (a node in the table) with VAL2 (a TYPE). */ - -bool -conv_type_hasher::equal (tree val1, tree val2) -{ - return TREE_TYPE (val1) == val2; -} - -/* Return an identifier for the mangled unqualified name for a - conversion operator to TYPE. This mangling is not specified by the - ABI spec; it is only used internally. */ - -tree -mangle_conv_op_name_for_type (const tree type) -{ - tree *slot; - tree identifier; - - if (type == error_mark_node) - return error_mark_node; - - if (conv_type_names == NULL) - conv_type_names = hash_table<conv_type_hasher>::create_ggc (31); - - slot = conv_type_names->find_slot_with_hash (type, - (hashval_t) TYPE_UID (type), - INSERT); - identifier = *slot; - if (!identifier) - { - char buffer[64]; - - /* Create a unique name corresponding to TYPE. */ - sprintf (buffer, "operator %lu", - (unsigned long) conv_type_names->elements ()); - identifier = get_identifier (buffer); - *slot = identifier; - - /* Hang TYPE off the identifier so it can be found easily later - when performing conversions. */ - TREE_TYPE (identifier) = type; - - /* Set the identifier kind so we know later it's a conversion. */ - set_identifier_kind (identifier, cik_conv_op); - } - - return identifier; -} - /* Handle ABI backwards compatibility for past bugs where we didn't call check_abi_tags in places where it's needed: call check_abi_tags and warn if it makes a difference. If FOR_DECL is non-null, it's the declaration |