ipa-devirt.c (type_with_linkage_p): New function.
authorJan Hubicka <hubicka@ucw.cz>
Tue, 12 May 2015 18:30:40 +0000 (20:30 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Tue, 12 May 2015 18:30:40 +0000 (18:30 +0000)
commite7a677ca1a53221276c0b382811c0351d381b35a
treeb8df808b4fa8ac89aaf5398200870e9e35e4c94b
parent2162235ef67bd4bb10fa1cc7c05ebb7a04c54625
ipa-devirt.c (type_with_linkage_p): New function.

* ipa-devirt.c (type_with_linkage_p): New function.
(type_in_anonymous_namespace_p): Move here from tree.c; assert that
type has linkage.
(odr_type_p): Move here from ipa-utils.h; use type_with_linkage_p.
(can_be_name_hashed_p): Simplify.
(hash_odr_name): Check that type has linkage before checking if it is
anonymous.
(types_same_for_odr): Likewise.
(odr_name_hasher::equal): Likewise.
(odr_subtypes_equivalent_p): Likewise.
(warn_types_mismatch): Likewise.
(get_odr_type): Likewise.
(odr_types_equivalent_p): Fix checking of TYPE_MAIN_VARIANT.
* ipa-utils.h (odr_type_p): Move offline.
* tree.c (need_assembler_name_p): Fix handling of types
without linkages.
(type_in_anonymous_namespace_p): Move to ipa-devirt.c

From-SVN: r223094
gcc/ChangeLog
gcc/ipa-devirt.c
gcc/ipa-utils.h
gcc/tree.c