Do not remove ifunc_resolver in LTO.

PR lto/94659
	* cgraph.h (cgraph_node::can_remove_if_no_direct_calls_and_refs_p):
	Do not remove ifunc_resolvers in remove unreachable nodes in LTO.
This commit is contained in:
Martin Liska 2020-04-27 06:44:29 +02:00
parent f6955089db
commit b9dbb436b7
No known key found for this signature in database
GPG Key ID: 4DC182DC0FA73785
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2020-04-27 Martin Liska <mliska@suse.cz>
PR lto/94659
* cgraph.h (cgraph_node::can_remove_if_no_direct_calls_and_refs_p):
Do not remove ifunc_resolvers in remove unreachable nodes in LTO.
2020-04-27 Xiong Hu Luo <luoxhu@linux.ibm.com>
PR target/91518

View File

@ -3162,7 +3162,7 @@ cgraph_node::can_remove_if_no_direct_calls_and_refs_p (void)
return false;
/* Only COMDAT functions can be removed if externally visible. */
if (externally_visible
&& (!DECL_COMDAT (decl)
&& ((!DECL_COMDAT (decl) || ifunc_resolver)
|| forced_by_abi
|| used_from_object_file_p ()))
return false;