diff options
Diffstat (limited to 'gcc/lto-streamer-in.c')
-rw-r--r-- | gcc/lto-streamer-in.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/lto-streamer-in.c b/gcc/lto-streamer-in.c index 3db1d38..9b785ff 100644 --- a/gcc/lto-streamer-in.c +++ b/gcc/lto-streamer-in.c @@ -1128,7 +1128,10 @@ input_function (tree fn_decl, struct data_in *data_in, Similarly remove all IFN_*SAN_* internal calls */ if (!flag_wpa) { - if (!MAY_HAVE_DEBUG_STMTS && is_gimple_debug (stmt)) + if (is_gimple_debug (stmt) + && (gimple_debug_nonbind_marker_p (stmt) + ? !MAY_HAVE_DEBUG_MARKER_STMTS + : !MAY_HAVE_DEBUG_BIND_STMTS)) remove = true; if (is_gimple_call (stmt) && gimple_call_internal_p (stmt)) @@ -1182,6 +1185,13 @@ input_function (tree fn_decl, struct data_in *data_in, { gsi_next (&bsi); stmts[gimple_uid (stmt)] = stmt; + + /* Remember that the input function has begin stmt + markers, so that we know to expect them when emitting + debug info. */ + if (!cfun->debug_nonbind_markers + && gimple_debug_nonbind_marker_p (stmt)) + cfun->debug_nonbind_markers = true; } } } |