diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2015-05-24 08:13:44 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2015-05-24 06:13:44 +0000 |
commit | 70e7f2a2df3f167c71b1a84ffb865c9a8e2610e1 (patch) | |
tree | be52c0776019c9e0eed372c7670a1d87ad3d6732 /gcc/tree.c | |
parent | 66f0bbd50c8cb13422f8cb60eb1a1077972c58cb (diff) | |
download | gcc-70e7f2a2df3f167c71b1a84ffb865c9a8e2610e1.zip gcc-70e7f2a2df3f167c71b1a84ffb865c9a8e2610e1.tar.gz gcc-70e7f2a2df3f167c71b1a84ffb865c9a8e2610e1.tar.bz2 |
ipa-utils.h (method_class_type): Remove.
* ipa-utils.h (method_class_type): Remove.
* cgraphunit.c (walk_polymorphic_call_targets): Use TYPE_METHOD_BASETYPE.
* ipa-devirt.c (type_in_anonymous_namespace_p): Check that it is called
on main variants only.
(method_class_type): Remove.
(update_type_inheritance_graph): Use TYPE_METHOD_BASETYPE.
(build_type_inheritance_graph): Likewise.
* ipa-icf.c (sem_function::equals_wpa): Likewise.
* pa-polymorphic-call.c (decl_maybe_in_construction_p,
check_stmt_for_type_change): Use TYPE_METHOD_BASETYPE.
From-SVN: r223629
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -13262,7 +13262,15 @@ verify_type (const_tree t) } } - + /* ipa-devirt makes an assumption that TYPE_METHOD_BASETYPE is always + TYPE_MAIN_VARIANT and it would be odd to add methods only to variatns + of a type. */ + if (TREE_CODE (t) == METHOD_TYPE + && TYPE_MAIN_VARIANT (TYPE_METHOD_BASETYPE (t)) != TYPE_METHOD_BASETYPE (t)) + { + error ("TYPE_METHOD_BASETYPE is not main variant"); + error_found = true; + } if (error_found) { |