diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-05-14 18:55:22 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-05-14 18:55:22 +0000 |
commit | 1d3f675f9a122578d8cabcd04bff9c521956450e (patch) | |
tree | 35fed41760bd91f12cf6b65723674cbbc0fcc28b /gcc/gimple.h | |
parent | 73bb17ceddeaafacaf347e7570eb24dfaeed452c (diff) | |
download | gcc-1d3f675f9a122578d8cabcd04bff9c521956450e.tar.gz |
PR c++/44127
gcc:
* gimple.h (enum gf_mask): Add GF_CALL_NOTHROW.
(gimple_call_set_nothrow): New.
* gimple.c (gimple_build_call_from_tree): Call it.
(gimple_call_flags): Set ECF_NOTHROW from GF_CALL_NOTHROW.
gcc/cp:
* except.c (dtor_nothrow): Return nonzero for type with
trivial destructor.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159408 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimple.h')
-rw-r--r-- | gcc/gimple.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/gimple.h b/gcc/gimple.h index 8ecf7eb0a4e..e9d21a99c73 100644 --- a/gcc/gimple.h +++ b/gcc/gimple.h @@ -106,6 +106,7 @@ enum gf_mask { GF_CALL_RETURN_SLOT_OPT = 1 << 2, GF_CALL_TAILCALL = 1 << 3, GF_CALL_VA_ARG_PACK = 1 << 4, + GF_CALL_NOTHROW = 1 << 5, GF_OMP_PARALLEL_COMBINED = 1 << 0, /* True on an GIMPLE_OMP_RETURN statement if the return does not require @@ -2213,6 +2214,19 @@ gimple_call_noreturn_p (gimple s) } +/* If NOTHROW_P is true, GIMPLE_CALL S is a call that is known to not throw + even if the called function can throw in other cases. */ + +static inline void +gimple_call_set_nothrow (gimple s, bool nothrow_p) +{ + GIMPLE_CHECK (s, GIMPLE_CALL); + if (nothrow_p) + s->gsbase.subcode |= GF_CALL_NOTHROW; + else + s->gsbase.subcode &= ~GF_CALL_NOTHROW; +} + /* Return true if S is a nothrow call. */ static inline bool |