diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2015-05-12 20:30:40 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2015-05-12 18:30:40 +0000 |
commit | e7a677ca1a53221276c0b382811c0351d381b35a (patch) | |
tree | b8df808b4fa8ac89aaf5398200870e9e35e4c94b /gcc/ipa-utils.h | |
parent | 2162235ef67bd4bb10fa1cc7c05ebb7a04c54625 (diff) | |
download | gcc-e7a677ca1a53221276c0b382811c0351d381b35a.zip gcc-e7a677ca1a53221276c0b382811c0351d381b35a.tar.gz gcc-e7a677ca1a53221276c0b382811c0351d381b35a.tar.bz2 |
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
Diffstat (limited to 'gcc/ipa-utils.h')
-rw-r--r-- | gcc/ipa-utils.h | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/gcc/ipa-utils.h b/gcc/ipa-utils.h index 0cf6541..13c59a83 100644 --- a/gcc/ipa-utils.h +++ b/gcc/ipa-utils.h @@ -63,6 +63,7 @@ possible_polymorphic_call_targets (tree, HOST_WIDE_INT, void **cache_token = NULL, bool speuclative = false); odr_type get_odr_type (tree, bool insert = false); +bool odr_type_p (const_tree t); bool possible_polymorphic_call_target_p (tree ref, gimple stmt, struct cgraph_node *n); void dump_possible_polymorphic_call_targets (FILE *, tree, HOST_WIDE_INT, const ipa_polymorphic_call_context &); @@ -153,23 +154,6 @@ possible_polymorphic_call_target_p (struct cgraph_edge *e, context, n); } -/* Return true of T is type with One Definition Rule info attached. - It means that either it is anonymous type or it has assembler name - set. */ - -static inline bool -odr_type_p (const_tree t) -{ - if (type_in_anonymous_namespace_p (t)) - return true; - /* We do not have this information when not in LTO, but we do not need - to care, since it is used only for type merging. */ - gcc_assert (in_lto_p || flag_lto); - - return (TYPE_NAME (t) - && (DECL_ASSEMBLER_NAME_SET_P (TYPE_NAME (t)))); -} - /* Return true if BINFO corresponds to a type with virtual methods. Every type has several BINFOs. One is the BINFO associated by the type |