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/ipa-devirt.c | |
parent | 61612fa5daee514e736102d0bdfb5a4eec391430 (diff) | |
download | gcc-5aaa8fb40681ee66282d73dab8c8eccbf5ee0518.zip gcc-5aaa8fb40681ee66282d73dab8c8eccbf5ee0518.tar.gz gcc-5aaa8fb40681ee66282d73dab8c8eccbf5ee0518.tar.bz2 |
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/ipa-devirt.c')
-rw-r--r-- | gcc/ipa-devirt.c | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/gcc/ipa-devirt.c b/gcc/ipa-devirt.c index f0bc250..9781acd 100644 --- a/gcc/ipa-devirt.c +++ b/gcc/ipa-devirt.c @@ -1602,62 +1602,6 @@ odr_types_equivalent_p (tree t1, tree t2, bool warn, bool *warned, return false; } - if ((TYPE_MAIN_VARIANT (t1) == t1 || TYPE_MAIN_VARIANT (t2) == t2) - && COMPLETE_TYPE_P (TYPE_MAIN_VARIANT (t1)) - && COMPLETE_TYPE_P (TYPE_MAIN_VARIANT (t2)) - && odr_type_p (TYPE_MAIN_VARIANT (t1)) - && odr_type_p (TYPE_MAIN_VARIANT (t2)) - && (TYPE_METHODS (TYPE_MAIN_VARIANT (t1)) - != TYPE_METHODS (TYPE_MAIN_VARIANT (t2)))) - { - /* Currently free_lang_data sets TYPE_METHODS to error_mark_node - if it is non-NULL so this loop will never realy execute. */ - if (TYPE_METHODS (TYPE_MAIN_VARIANT (t1)) != error_mark_node - && TYPE_METHODS (TYPE_MAIN_VARIANT (t2)) != error_mark_node) - for (f1 = TYPE_METHODS (TYPE_MAIN_VARIANT (t1)), - f2 = TYPE_METHODS (TYPE_MAIN_VARIANT (t2)); - f1 && f2 ; f1 = DECL_CHAIN (f1), f2 = DECL_CHAIN (f2)) - { - if (DECL_ASSEMBLER_NAME (f1) != DECL_ASSEMBLER_NAME (f2)) - { - warn_odr (t1, t2, f1, f2, warn, warned, - G_("a different method of same type " - "is defined in another " - "translation unit")); - return false; - } - if (DECL_VIRTUAL_P (f1) != DECL_VIRTUAL_P (f2)) - { - warn_odr (t1, t2, f1, f2, warn, warned, - G_("a definition that differs by virtual " - "keyword in another translation unit")); - return false; - } - if (DECL_VINDEX (f1) != DECL_VINDEX (f2)) - { - warn_odr (t1, t2, f1, f2, warn, warned, - G_("virtual table layout differs " - "in another translation unit")); - return false; - } - if (odr_subtypes_equivalent_p (TREE_TYPE (f1), - TREE_TYPE (f2), visited, - loc1, loc2)) - { - warn_odr (t1, t2, f1, f2, warn, warned, - G_("method with incompatible type is " - "defined in another translation unit")); - return false; - } - } - if ((f1 == NULL) != (f2 == NULL)) - { - warn_odr (t1, t2, NULL, NULL, warn, warned, - G_("a type with different number of methods " - "is defined in another translation unit")); - return false; - } - } } break; } |