diff options
Diffstat (limited to 'gcc/gimple.h')
-rw-r--r-- | gcc/gimple.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/gimple.h b/gcc/gimple.h index 6cc7e66..108ae84 100644 --- a/gcc/gimple.h +++ b/gcc/gimple.h @@ -149,6 +149,7 @@ enum gf_mask { GF_CALL_MUST_TAIL_CALL = 1 << 9, GF_CALL_BY_DESCRIPTOR = 1 << 10, GF_CALL_NOCF_CHECK = 1 << 11, + GF_CALL_FROM_NEW_OR_DELETE = 1 << 12, GF_OMP_PARALLEL_COMBINED = 1 << 0, GF_OMP_TASK_TASKLOOP = 1 << 0, GF_OMP_TASK_TASKWAIT = 1 << 1, @@ -3387,6 +3388,29 @@ gimple_call_from_thunk_p (gcall *s) } +/* If FROM_NEW_OR_DELETE_P is true, mark GIMPLE_CALL S as being a call + to operator new or delete created from a new or delete expression. */ + +static inline void +gimple_call_set_from_new_or_delete (gcall *s, bool from_new_or_delete_p) +{ + if (from_new_or_delete_p) + s->subcode |= GF_CALL_FROM_NEW_OR_DELETE; + else + s->subcode &= ~GF_CALL_FROM_NEW_OR_DELETE; +} + + +/* Return true if GIMPLE_CALL S is a call to operator new or delete from + from a new or delete expression. */ + +static inline bool +gimple_call_from_new_or_delete (gcall *s) +{ + return (s->subcode & GF_CALL_FROM_NEW_OR_DELETE) != 0; +} + + /* If PASS_ARG_PACK_P is true, GIMPLE_CALL S is a stdarg call that needs the argument pack in its argument list. */ |