diff options
Diffstat (limited to 'gcc/lto-cgraph.c')
-rw-r--r-- | gcc/lto-cgraph.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/lto-cgraph.c b/gcc/lto-cgraph.c index 063477920a0..95c446d0696 100644 --- a/gcc/lto-cgraph.c +++ b/gcc/lto-cgraph.c @@ -1885,7 +1885,7 @@ input_symtab (void) target code, and store them into OFFLOAD_FUNCS and OFFLOAD_VARS. */ void -input_offload_tables (void) +input_offload_tables (bool do_force_output) { struct lto_file_decl_data **file_data_vec = lto_get_file_decl_data (); struct lto_file_decl_data *file_data; @@ -1915,7 +1915,8 @@ input_offload_tables (void) /* Prevent IPA from removing fn_decl as unreachable, since there may be no refs from the parent function to child_fn in offload LTO mode. */ - cgraph_node::get (fn_decl)->mark_force_output (); + if (do_force_output) + cgraph_node::get (fn_decl)->mark_force_output (); } else if (tag == LTO_symtab_variable) { @@ -1926,7 +1927,8 @@ input_offload_tables (void) /* Prevent IPA from removing var_decl as unused, since there may be no refs to var_decl in offload LTO mode. */ - varpool_node::get (var_decl)->force_output = 1; + if (do_force_output) + varpool_node::get (var_decl)->force_output = 1; } else fatal_error (input_location, |