diff options
author | Nathan Sidwell <nathan@acm.org> | 2017-07-21 00:27:51 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2017-07-21 00:27:51 +0000 |
commit | 5aaa8fb40681ee66282d73dab8c8eccbf5ee0518 (patch) | |
tree | 9eb091e90a6d0a753271dc34499ed1179b3527ca /gcc/dbxout.c | |
parent | 61612fa5daee514e736102d0bdfb5a4eec391430 (diff) |
Remove TYPE_METHODS.
gcc/
Remove TYPE_METHODS.
* tree.h (TYPE_METHODS): Delete.
* dwarf2out.c (gen_member_die): Member fns are on TYPE_FIELDS.
* dbxout.c (dbxout_type_fields): Ignore FUNCTION_DECLs.
(dbxout_type_methods): Scan TYPE_FIELDS.
(dbxout_type): Don't check TYPE_METHODS here.
* function.c (use_register_for_decl): Always ignore register for
class types when not optimizing.
* ipa-devirt.c (odr_types_equivalent_p): Delete TYPE_METHODS scan.
* tree.c (free_lang_data_in_type): Stitch out member functions and
templates from TYPE_FIELDS.
(build_distinct_type_copy, verify_type_variant,
verify_type): Member fns are on TYPE_FIELDS.
* tree-dump.c (dequeue_and_dump): No TYPE_METHODS.
* tree-pretty-print.c (dump_generic_node): Likewise.
gcc/cp/
Remove TYPE_METHODS.
* class.c (maybe_warn_about_overly_private_class,
finish_struct_methods, one_inheriting_sig, count_fields,
add_fields_to_record_type, check_field_decls, check_methods,
clone_function_decl, set_method_tm_attributes,
finalize_literal_type_property, check_bases_and_members,
create_vtable_ptr, determine_key_method,
unreverse_member_declarations, finish_struct,
add_vcall_offset_vtbl_entries_1): Member fns are on TYPE_FIELDS.
* decl.c (fixup_anonymous_aggr): Likewise.
* decl2.c (reset_type_linkage_2): Likewise.
* method.c (after_nsdmi_defaulted_late_checks,
lazily_declare_fn): Likewise.
* optimize.c (maybe_thunk_body, maybe_clone_body): Likewise.
* pt.c (instantiate_class_template_1, tsubst_expr,
do_type_instantiation, instantiate_pending_templates): Likewise.
* search.c (lookup_field_1): Likewise.
* semantics.c (finish_member_declaration,
finish_omp_declare_simd_methods): Likewise.
gcc/c-family/
Remove TYPE_METHODS.
* c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
dump_ada_template, print_ada_methods,
print_ada_declaration): Member fns are on TYPE_FIELDS.
gcc/objc/
Remove TYPE_METHODS.
* objc-runtime-shared-support.c (build_ivar_list_initializer):
Don't presume first item is a FIELD_DECL.
gcc/testsuite/
* g++.dg/ext/anon-struct6.C: Adjust diag.
* g++.old-deja/g++.other/anon4.C: Adjust diag.
libcc1/
Remove TYPE_METHODS.
* libcp1plugin.cc (plugin_build_decl): Member fns are on TYPE_FIELDS.
From-SVN: r250413
Diffstat (limited to 'gcc/dbxout.c')
-rw-r--r-- | gcc/dbxout.c | 43 |
1 files changed, 13 insertions, 30 deletions
diff --git a/gcc/dbxout.c b/gcc/dbxout.c index 783a70bec4f..b278c6da1d4 100644 --- a/gcc/dbxout.c +++ b/gcc/dbxout.c @@ -1481,6 +1481,8 @@ dbxout_type_fields (tree type) /* Omit here local type decls until we know how to support them. */ if (TREE_CODE (tem) == TYPE_DECL || TREE_CODE (tem) == TEMPLATE_DECL + /* Member functions emitted after fields. */ + || TREE_CODE (tem) == FUNCTION_DECL /* Omit here the nameless fields that are used to skip bits. */ || DECL_IGNORED_P (tem) /* Omit fields whose position or size are variable or too large to @@ -1586,55 +1588,38 @@ dbxout_type_method_1 (tree decl) } } -/* Subroutine of `dbxout_type'. Output debug info about the methods defined - in TYPE. */ +/* Subroutine of `dbxout_type'. Output debug info about the member + functions defined in TYPE. */ static void dbxout_type_methods (tree type) { - /* C++: put out the method names and their parameter lists */ - tree methods = TYPE_METHODS (type); - tree fndecl; - tree last; - - if (methods == NULL_TREE) - return; - - if (TREE_CODE (methods) != TREE_VEC) - fndecl = methods; - else if (TREE_VEC_ELT (methods, 0) != NULL_TREE) - fndecl = TREE_VEC_ELT (methods, 0); - else - fndecl = TREE_VEC_ELT (methods, 1); - - while (fndecl) + for (tree fndecl = TYPE_FIELDS (type); fndecl;) { int need_prefix = 1; /* Group together all the methods for the same operation. These differ in the types of the arguments. */ - for (last = NULL_TREE; + for (tree last = NULL_TREE; fndecl && (last == NULL_TREE || DECL_NAME (fndecl) == DECL_NAME (last)); fndecl = DECL_CHAIN (fndecl)) /* Output the name of the field (after overloading), as well as the name of the field before overloading, along with its parameter list */ { - /* Skip methods that aren't FUNCTION_DECLs. (In C++, these - include TEMPLATE_DECLs.) The debugger doesn't know what - to do with such entities anyhow. */ + /* Skip non-functions. */ if (TREE_CODE (fndecl) != FUNCTION_DECL) continue; - CONTIN; - - last = fndecl; - /* Also ignore abstract methods; those are only interesting to the DWARF backends. */ if (DECL_IGNORED_P (fndecl) || DECL_ABSTRACT_P (fndecl)) continue; + CONTIN; + + last = fndecl; + /* Redundantly output the plain name, since that's what gdb expects. */ if (need_prefix) @@ -2209,10 +2194,8 @@ dbxout_type (tree type, int full) /* Write out the field declarations. */ dbxout_type_fields (type); - if (use_gnu_debug_info_extensions && TYPE_METHODS (type) != NULL_TREE) - { - dbxout_type_methods (type); - } + if (use_gnu_debug_info_extensions) + dbxout_type_methods (type); stabstr_C (';'); |