diff options
Diffstat (limited to 'gcc/tree-flow-inline.h')
-rw-r--r-- | gcc/tree-flow-inline.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/tree-flow-inline.h b/gcc/tree-flow-inline.h index ef6888882d1..70450537698 100644 --- a/gcc/tree-flow-inline.h +++ b/gcc/tree-flow-inline.h @@ -131,6 +131,14 @@ get_filename (tree expr) return "???"; } +/* Return true if T is a noreturn call. */ +static inline bool +noreturn_call_p (tree t) +{ + tree call = get_call_expr_in (t); + return call != 0 && (call_expr_flags (call) & ECF_NORETURN) != 0; +} + /* Mark statement T as modified. */ static inline void modify_stmt (tree t) @@ -138,6 +146,8 @@ modify_stmt (tree t) stmt_ann_t ann = stmt_ann (t); if (ann == NULL) ann = create_stmt_ann (t); + else if (noreturn_call_p (t)) + VEC_safe_push (tree, modified_noreturn_calls, t); ann->modified = 1; } |