aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-utils.h
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2018-10-26 09:20:01 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2018-10-26 07:20:01 +0000
commit420672bc92e560bcebf12bdd1f3423362c93bf2e (patch)
treee87d7b82e66cbef3db48d8aa3b1869ae4fe53d64 /gcc/ipa-utils.h
parent99976e2700062d03a06412a92b345741f735deff (diff)
downloadgcc-420672bc92e560bcebf12bdd1f3423362c93bf2e.zip
gcc-420672bc92e560bcebf12bdd1f3423362c93bf2e.tar.gz
gcc-420672bc92e560bcebf12bdd1f3423362c93bf2e.tar.bz2
ipa-devirt.c (warn_odr): Make static.
* ipa-devirt.c (warn_odr): Make static. (types_same_for_odr): Drop strict variant. (types_odr_comparable): Likewise. (odr_or_derived_type_p): Look for main variants. (odr_name_hasher::equal): Cleanup comment. (odr_subtypes_equivalent): Add warn and warned arguments; check main variants. (type_variants_equivalent_p): break out from ... (odr_types_equivalent): ... here; go for main variants where needed. (warn_odr): ... here; turn static. (warn_types_mismatch): Compare mangled names of main variants. * ipa-utils.h (types_odr_comparable): Drop strict parameter. (type_with_linkage_p): Sanity check that we look at main variant. * lto.c (lto_read_decls): Only consider main variant to be ODR type. * tree.h (types_same_for_odr): Drop strict argument. From-SVN: r265519
Diffstat (limited to 'gcc/ipa-utils.h')
-rw-r--r--gcc/ipa-utils.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/ipa-utils.h b/gcc/ipa-utils.h
index 7d663ec..371b2fb 100644
--- a/gcc/ipa-utils.h
+++ b/gcc/ipa-utils.h
@@ -83,7 +83,7 @@ bool type_known_to_have_no_derivations_p (tree);
bool contains_polymorphic_type_p (const_tree);
void register_odr_type (tree);
bool types_must_be_same_for_odr (tree, tree);
-bool types_odr_comparable (tree, tree, bool strict = false);
+bool types_odr_comparable (tree, tree);
cgraph_node *try_speculative_devirtualization (tree, HOST_WIDE_INT,
ipa_polymorphic_call_context);
void warn_types_mismatch (tree t1, tree t2, location_t loc1 = UNKNOWN_LOCATION,
@@ -179,6 +179,7 @@ polymorphic_type_binfo_p (const_tree binfo)
inline bool
type_with_linkage_p (const_tree t)
{
+ gcc_checking_assert (TYPE_MAIN_VARIANT (t) == t);
if (!TYPE_NAME (t) || TREE_CODE (TYPE_NAME (t)) != TYPE_DECL)
return false;