diff options
author | Mark Mitchell <mark@codesourcery.com> | 2000-06-08 17:34:33 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2000-06-08 17:34:33 +0000 |
commit | 657c130a99d42441051b68f1640410629a78dd0b (patch) | |
tree | 05fb2eb51daae6893a4a0ff5e95026d9f771681c /gcc/cp/decl.c | |
parent | 21217bd0046bac65c93395d55186771c2633af04 (diff) | |
download | gcc-657c130a99d42441051b68f1640410629a78dd0b.zip gcc-657c130a99d42441051b68f1640410629a78dd0b.tar.gz gcc-657c130a99d42441051b68f1640410629a78dd0b.tar.bz2 |
invoke.texi: Remove documentation for -fsquangle and -fname-mangling-version.
* invoke.texi: Remove documentation for -fsquangle and
-fname-mangling-version.
Remove old ABI mangling code.
* cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID and
CPTI_TINFO_VAR_ID.
(tinfo_decl_id): Remove.
(tinfo_var_id): Likewise.
(name_mangling_version): Likewise.
(flag_do_squangling): Likewise.
(get_vtt_name): Likewise.
(init_method): Likewise.
(build_overload_name): Likewise.
(build_static_name): Likewise.
(build_decl_overload_real): Likewise.
(build_overload_with_type): Likewise.
(build_destructor_name): Likewise.
(get_id_2): Likewise.
(get_ctor_vtbl_name): Likewise.
(mangle_typeinfo_fn_for_type): New function.
(mangle_java_reflection_var_for_type): Likewise.
* call.c (build_new_method_call): Use mangle_vtt_for_type.
* class.c (get_vtable_name): Remove.
(get_vtt_name): Remove.
(get_vtable_decl): Use mangle_vtbl_for_type.
(build_vtt): Likewise.
(build_ctor_vtbl_group): Remove old ABI mangling support.
* decl.c (pushtag): Likewise.
(maybe_commonize_var): Use set_mangled_name_for_decl.
(grokfndecl): Remove old ABI mangling support.
(grokvardecl): Likewise.
(grokdeclarator): Likewise.
(grok_op_properties): Adjust use of DEF_OPERATOR.
* decl2.c (name_mangling_version): Remove.
(lang_f_options): Remove squangle.
(unsupported_options): Add squangle.
(lang_decode_options): Don't set flag_do_squangling. Issue a
warning for -fname-mangling-version.
(grokclassfn): Remove old ABI mangling support.
(finish_static_data_member_decl): Likewise.
(grokfield): Likewise.
(grokoptypename): Likewise.
(get_sentry): Likewise.
* init.c (build_java_class_ref): Use
mangle_java_reflection_var_for_type.
* lex.c (init_operators): Adjust use of DEF_OPERATOR.
(init_parse): Call init_mangle, not init_method.
* mangle.c (write_special_name_constructor): Handle
maybe-in-charge constructors.
(write_special_name_destructor): Handle
maybe-in-charge destructors.
(write_expression): Tweak code to handle non-type template
arguments with reference type.
(mangle_typeinfo_fn_for_type): New function.
(mangle_java_reflection_var_for_type): Likewise.
(mangle_conv_op_name_for_type): Don't use a name that the user
could type.
* method.c (enum mangling_flags): Remove.
(mangling_flags): Likewise.
(obstack_chunk_alloc): Likewise.
(obstack_chunk_free): Likewise.
(OB_INIT): Likewise.
(OB_PUTC): Likewise.
(OB_PUTC2): Likewise.
(OB_PUTS): Likewise.
(OB_PUTID): Likewise.
(OB_PUTCP): Likewise.
(OB_FINISH): Likewise.
(OB_LAST): Likewise.
(btypelist): Likewise.
(ktypelist): Likewise.
(maxbtype): Likewise.
(maxktype): Likewise.
(typevec): Likewise.
(maxtype): Likewise.
(init_method): Likewise.
(digit_buffer): Likewise.
(nofold): Likewise.
(start_squangling): Likewise.
(end_squangling): Likewise.
(icat): Likewise.
(dicat): Likewise.
(old_backref_index): Likewise.
(flush_repeats): Likewise.
(is_back_referenceable_type): Likewise.
(issue_nrepeats): Likewise.
(check_ktype): Likewise.
(issue_ktype): Likewise.
(build_overload_nested_name): Likewise.
(build_underscore_int): Likewise.
(build_overload_scope_ref): Likewise.
(mangle_expression): Likewise.
(build_overload_int): Likewise.
(mangled_C9x_name): Likewise.
(build_overload_value): Likewise.
(build_template_template_parm_names): Likewise.
(build_template_parm_names): Likewise.
(build_overload_identifier): Likewise.
(build_qualified_name): Likewise.
(build_mangled_name_for_type_with_Gcode): Likewise.
(build_mangled_name_for_type): Likewise.
(build_overload_name): Likewise.
(build_mangled_name): Likewise.
(process_modifiers): Likewise.
(check_btype): Likewise.
(process_overload_item): Likewise.
(build_static_name): Likewise.
(build_decl_overload_real): Likewise.
(set_mangled_name_for_decl): Remove old ABI mangling support.
(build_typename_overload): Remove.
(build_overload_with_type): Remove.
(get_id_2): Remove.
(get_ctor_vtbl_name): Remove.
(build_destructor_name): Likewise.
(set_mangled_name_for_decl): Likewise.
(make_thunk): Remove old ABI mangling support.
* operators.def: Likewise.
* pt.c (check_explicit_specialization): Don't call
set_mangled_name_for_template_decl.
(lookup_template_class): Remove old ABI mangling support.
(tsubst_friend_function): Update comment.
(tsubst_decl): Remove old ABI mangling support.
(tsubst_copy): Likewise.
(set_mangled_name_for_template_decl): Remove.
* rtti.c (init_rtti_processing): Use std_identifier. Don't set
tinfo_decl_id or tinfo_var_id.
(get_tinfo_var): Use mangle_typeinfo_for_type.
(tinfo_name): Remove old ABI mangling support.
(get_tinfo_decl): Likewise.
(tinfo_base_init): Likewise.
(create_real_tinfo_var): Use a name that the user can't type.
* tinfo2.cc (BUILTIN): Adjust to use new mangling.
From-SVN: r34458
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r-- | gcc/cp/decl.c | 76 |
1 files changed, 19 insertions, 57 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 413ff6c..22bdb9d 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -254,9 +254,7 @@ tree error_mark_list; tree global_delete_fndecl; Used by RTTI - tree type_info_type_node, tinfo_decl_id, tinfo_decl_type; - tree tinfo_var_id; - + tree type_info_type_node, tinfo_decl_type; */ tree cp_global_trees[CPTI_MAX]; @@ -2892,13 +2890,7 @@ pushtag (name, type, globalize) VARRAY_PUSH_TREE (local_classes, type); if (!uses_template_parms (type)) - { - if (flag_new_abi) - DECL_ASSEMBLER_NAME (d) = mangle_type (type); - else - DECL_ASSEMBLER_NAME (d) - = get_identifier (build_overload_name (type, 1, 1)); - } + DECL_ASSEMBLER_NAME (d) = mangle_type (type); } if (b->parm_flag == 2) { @@ -7626,8 +7618,7 @@ maybe_commonize_var (decl) which we can't if it has been initialized. */ if (TREE_PUBLIC (decl)) - DECL_ASSEMBLER_NAME (decl) - = build_static_name (current_function_decl, DECL_NAME (decl)); + set_mangled_name_for_decl (decl); else { cp_warning_at ("sorry: semantics of inline function static data `%#D' are wrong (you'll wind up with multiple copies)", decl); @@ -8977,9 +8968,9 @@ grokfndecl (ctype, type, declarator, orig_declarator, virtualp, flags, quals, add_defarg_fn (decl); /* Plain overloading: will not be grok'd by grokclassfn. */ - if (! ctype && ! processing_template_decl + if (! ctype && ! processing_template_decl && !DECL_EXTERN_C_P (decl) - && (! DECL_USE_TEMPLATE (decl) || name_mangling_version < 1)) + && !DECL_USE_TEMPLATE (decl)) set_mangled_name_for_decl (decl); if (funcdef_flag) @@ -9094,13 +9085,7 @@ grokvardecl (type, declarator, specbits_in, initialized, constp, in_namespace) /* DECL_ASSEMBLER_NAME is needed only for full-instantiated templates. */ if (!uses_template_parms (decl)) - { - if (flag_new_abi) - DECL_ASSEMBLER_NAME (decl) = mangle_decl (decl); - else - DECL_ASSEMBLER_NAME (decl) = build_static_name (basetype, - declarator); - } + DECL_ASSEMBLER_NAME (decl) = mangle_decl (decl); } else { @@ -9125,13 +9110,7 @@ grokvardecl (type, declarator, specbits_in, initialized, constp, in_namespace) context = DECL_CONTEXT (decl); if (declarator && context && current_lang_name != lang_name_c) - { - if (flag_new_abi) - DECL_ASSEMBLER_NAME (decl) = mangle_decl (decl); - else - DECL_ASSEMBLER_NAME (decl) - = build_static_name (context, declarator); - } + DECL_ASSEMBLER_NAME (decl) = mangle_decl (decl); } if (in_namespace) @@ -11166,24 +11145,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist) DECL_NAME (CLASSTYPE_TI_TEMPLATE (type)) = TYPE_IDENTIFIER (type); - if (flag_new_abi) - DECL_ASSEMBLER_NAME (decl) = mangle_type (type); - else - { - /* XXX Temporarily set the scope. - When returning, start_decl expects it as NULL_TREE, - and will then then set it using pushdecl. */ - my_friendly_assert (DECL_CONTEXT (decl) == NULL_TREE, 980404); - if (current_class_type) - DECL_CONTEXT (decl) = current_class_type; - else - DECL_CONTEXT (decl) = FROB_CONTEXT (current_namespace); - - DECL_ASSEMBLER_NAME (decl) = DECL_NAME (decl); - DECL_ASSEMBLER_NAME (decl) - = get_identifier (build_overload_name (type, 1, 1)); - DECL_CONTEXT (decl) = NULL_TREE; - } + DECL_ASSEMBLER_NAME (decl) = mangle_type (type); /* FIXME remangle member functions; member functions of a type with external linkage have external linkage. */ @@ -12336,17 +12298,17 @@ grok_op_properties (decl, virtualp, friendp) else do { -#define DEF_OPERATOR(NAME, CODE, NEW_MANGLING, OLD_MANGING, ARITY, ASSN_P) \ - if (ansi_opname (CODE) == name) \ - { \ - operator_code = CODE; \ - break; \ - } \ - else if (ansi_assopname (CODE) == name) \ - { \ - operator_code = CODE; \ - DECL_ASSIGNMENT_OPERATOR_P (decl) = 1; \ - break; \ +#define DEF_OPERATOR(NAME, CODE, MANGLING, ARITY, ASSN_P) \ + if (ansi_opname (CODE) == name) \ + { \ + operator_code = CODE; \ + break; \ + } \ + else if (ansi_assopname (CODE) == name) \ + { \ + operator_code = CODE; \ + DECL_ASSIGNMENT_OPERATOR_P (decl) = 1; \ + break; \ } #include "operators.def" |