diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-06-08 17:34:33 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-06-08 17:34:33 +0000 |
commit | f2b8a47dda48aed89fbac66ebb8455cf206cae83 (patch) | |
tree | 05fb2eb51daae6893a4a0ff5e95026d9f771681c /gcc/cp/decl2.c | |
parent | 0a44b200168626349c722e2d2c2290b635d1533a (diff) | |
download | gcc-f2b8a47dda48aed89fbac66ebb8455cf206cae83.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34458 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/decl2.c')
-rw-r--r-- | gcc/cp/decl2.c | 55 |
1 files changed, 13 insertions, 42 deletions
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 6fc7bb5b98e..872290d1a15 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -466,11 +466,6 @@ int flag_inline_trees = 0; int max_tinst_depth = 17; -/* The name-mangling scheme to use. Must be 1 or greater to support - template functions with identical types, but different template - arguments. */ -int name_mangling_version = 2; - /* Nonzero if wchar_t should be `unsigned short' instead of whatever it would normally be, for use with WINE. */ int flag_short_wchar; @@ -552,7 +547,6 @@ lang_f_options[] = {"permissive", &flag_permissive, 1}, {"repo", &flag_use_repository, 1}, {"rtti", &flag_rtti, 1}, - {"squangle", &flag_do_squangling, 1}, {"stats", &flag_detailed_statistics, 1}, {"strict-prototype", &flag_strict_prototype, 1}, {"use-cxa-atexit", &flag_use_cxa_atexit, 1}, @@ -570,7 +564,8 @@ static const char * const unsupported_options[] = { "enum-int-equiv", "guiding-decls", "nonnull-objects", - "this-is-variable", + "squangle", + "this-is-variable" }; /* Compare two option strings, pointed two by P1 and P2, for use with @@ -665,22 +660,20 @@ lang_decode_option (argc, argv) else if (!strcmp (p, "new-abi")) { flag_new_abi = 1; - flag_do_squangling = 1; flag_vtable_thunks = 1; } else if (!strcmp (p, "no-new-abi")) - { - flag_new_abi = 0; - flag_do_squangling = 0; - } + flag_new_abi = 0; else if ((option_value = skip_leading_substring (p, "template-depth-"))) max_tinst_depth = read_integral_parameter (option_value, p - 2, max_tinst_depth); else if ((option_value = skip_leading_substring (p, "name-mangling-version-"))) - name_mangling_version - = read_integral_parameter (option_value, p - 2, name_mangling_version); + { + warning ("-f%s is no longer supported", p); + return 1; + } else if ((option_value = skip_leading_substring (p, "dump-translation-unit-"))) { @@ -1104,16 +1097,10 @@ grokclassfn (ctype, function, flags, quals) if (flags == DTOR_FLAG) { DECL_DESTRUCTOR_P (function) = 1; - - if (flag_new_abi) - set_mangled_name_for_decl (function); - else - DECL_ASSEMBLER_NAME (function) = build_destructor_name (ctype); - TYPE_HAS_DESTRUCTOR (ctype) = 1; } - else - set_mangled_name_for_decl (function); + + set_mangled_name_for_decl (function); } /* Work on the expr used by alignof (this is only called by the parser). */ @@ -1580,11 +1567,7 @@ finish_static_data_member_decl (decl, init, asmspec_tree, flags) if (!asmspec && current_class_type) { DECL_INITIAL (decl) = error_mark_node; - if (flag_new_abi) - DECL_ASSEMBLER_NAME (decl) = mangle_decl (decl); - else - DECL_ASSEMBLER_NAME (decl) - = build_static_name (current_class_type, DECL_NAME (decl)); + DECL_ASSEMBLER_NAME (decl) = mangle_decl (decl); } if (! processing_template_decl) { @@ -1715,13 +1698,7 @@ grokfield (declarator, declspecs, init, asmspec_tree, attrlist) name for this TYPE_DECL. */ DECL_ASSEMBLER_NAME (value) = DECL_NAME (value); if (!uses_template_parms (value)) - { - if (flag_new_abi) - DECL_ASSEMBLER_NAME (value) = mangle_type (TREE_TYPE (value)); - else - DECL_ASSEMBLER_NAME (value) = - get_identifier (build_overload_name (TREE_TYPE (value), 1, 1)); - } + DECL_ASSEMBLER_NAME (value) = mangle_type (TREE_TYPE (value)); if (processing_template_decl) value = push_template_decl (value); @@ -1907,10 +1884,7 @@ grokoptypename (declspecs, declarator) tree declspecs, declarator; { tree t = grokdeclarator (declarator, declspecs, TYPENAME, 0, NULL_TREE); - if (flag_new_abi) - return mangle_conv_op_name_for_type (t); - else - return build_typename_overload (t); + return mangle_conv_op_name_for_type (t); } /* When a function is declared with an initializer, @@ -2871,10 +2845,7 @@ get_sentry (decl) tree sname; tree sentry; - if (!flag_new_abi) - sname = get_id_2 ("__sn", DECL_ASSEMBLER_NAME (decl)); - else - sname = mangle_guard_variable (decl); + sname = mangle_guard_variable (decl); /* For struct X foo __attribute__((weak)), there is a counter __snfoo. Since base is already an assembler name, sname should |