From d7145b4bb6c8729a1e782373cb6256c06ed60465 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Wed, 31 Mar 2021 11:35:29 +0200 Subject: Small refactoring of cgraph_node::release_body PR lto/99447 * cgraph.c (cgraph_node::release_body): Remove all callers and references. * cgraphclones.c (cgraph_node::materialize_clone): Do not do it here. * cgraphunit.c (cgraph_node::expand): And here. --- gcc/cgraph.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gcc/cgraph.c') diff --git a/gcc/cgraph.c b/gcc/cgraph.c index 8014075..b77c676 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -1860,6 +1860,9 @@ cgraph_node::release_body (bool keep_arguments) lto_free_function_in_decl_state_for_node (this); lto_file_data = NULL; } + gcc_assert (!clones); + remove_callees (); + remove_all_references (); } /* Remove function from symbol table. */ -- cgit v1.1