diff options
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r-- | gcc/cgraph.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c index 9480935..067984d 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -3872,16 +3872,27 @@ cgraph_node::function_or_virtual_thunk_symbol } /* When doing LTO, read cgraph_node's body from disk if it is not already - present. */ + present. Also perform any necessary clone materializations. */ bool -cgraph_node::get_untransformed_body (void) +cgraph_node::get_untransformed_body () { lto_file_decl_data *file_data; const char *data, *name; size_t len; tree decl = this->decl; + /* See if there is clone to be materialized. + (inline clones does not need materialization, but we can be seeing + an inline clone of real clone). */ + cgraph_node *p = this; + for (cgraph_node *c = clone_of; c; c = c->clone_of) + { + if (c->decl != decl) + p->materialize_clone (); + p = c; + } + /* Check if body is already there. Either we have gimple body or the function is thunk and in that case we set DECL_ARGUMENTS. */ if (DECL_ARGUMENTS (decl) || gimple_has_body_p (decl)) |