summaryrefslogtreecommitdiff
path: root/gcc/gimple.c
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2013-12-16 12:16:17 -0500
committerDavid Malcolm <dmalcolm@redhat.com>2014-10-24 17:24:08 -0400
commit564c98933b306f404b28d0672f7a32ad9c17a64d (patch)
tree8b95c6caec73643ef6f501b2d00b56da064707fa /gcc/gimple.c
parent4f6980c71e3e7c6193133217cfabe900c185f655 (diff)
downloadgcc-564c98933b306f404b28d0672f7a32ad9c17a64d.tar.gz
Introduce gimple_eh_filter
This corresponds to: [PATCH 26/89] Introduce gimple_eh_filter https://gcc.gnu.org/ml/gcc-patches/2014-04/msg01220.html from the original 89-patch kit That earlier patch was approved by Jeff: > OK after fixing up the naming/const stuff as discussed for prior > patches. > That applies to 22-30. Make sure to take care of > the pretty printers per Trevor's comments as well. He indicated those > were missing in a couple of those patches. in https://gcc.gnu.org/ml/gcc-patches/2014-05/msg00628.html gcc/ * coretypes.h (gimple_eh_filter): New typedef. (const_gimple_eh_filter): New typedef. * gimple.h (gimple_build_eh_filter): Return a gimple_eh_filter rather than a plain gimple. * gimple-pretty-print.c (dump_gimple_eh_filter): Require a gimple_eh_filter rather than a plain gimple. (pp_gimple_stmt_1): Add checked cast to gimple_eh_filter within GIMPLE_EH_FILTER case of switch statement. * gimple.c (gimple_build_eh_filter): Return a gimple_eh_filter rather than a plain gimple.
Diffstat (limited to 'gcc/gimple.c')
-rw-r--r--gcc/gimple.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/gimple.c b/gcc/gimple.c
index 61a9c83db8c..3b1ff987f2f 100644
--- a/gcc/gimple.c
+++ b/gcc/gimple.c
@@ -630,10 +630,11 @@ gimple_build_catch (tree types, gimple_seq handler)
TYPES are the filter's types.
FAILURE is the filter's failure action. */
-gimple
+gimple_eh_filter
gimple_build_eh_filter (tree types, gimple_seq failure)
{
- gimple p = gimple_alloc (GIMPLE_EH_FILTER, 0);
+ gimple_eh_filter p =
+ as_a <gimple_eh_filter> (gimple_alloc (GIMPLE_EH_FILTER, 0));
gimple_eh_filter_set_types (p, types);
if (failure)
gimple_eh_filter_set_failure (p, failure);