summaryrefslogtreecommitdiff
path: root/gcc/gimple.c
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2013-12-16 14:07:56 -0500
committerDavid Malcolm <dmalcolm@redhat.com>2014-10-24 17:24:14 -0400
commit6cae7b6bf7a9b5a6e46fae677a56a9e88e498f0a (patch)
tree7f66060ba3780354d3a0052c7c56d58d23db3044 /gcc/gimple.c
parent53b17ee90d7b80c4947e34eeccc936241a8dca04 (diff)
downloadgcc-6cae7b6bf7a9b5a6e46fae677a56a9e88e498f0a.tar.gz
Introduce gimple_eh_dispatch
This corresponds to: [PATCH 30/89] Introduce gimple_eh_dispatch https://gcc.gnu.org/ml/gcc-patches/2014-04/msg01236.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_dispatch): New typedef. (const_gimple_eh_dispatch): New typedef. * gimple-pretty-print.c (dump_gimple_eh_dispatch): Require a gimple_eh_dispatch rather than a plain gimple. (pp_gimple_stmt_1): Add a checked cast to gimple_eh_dispatch within GIMPLE_EH_DISPATCH case of switch statement. * gimple-streamer-in.c (input_gimple_stmt): Likewise. * gimple-streamer-out.c (output_gimple_stmt): Likewise. * gimple.c (gimple_build_eh_dispatch): Return a gimple_eh_dispatch rather than a plain gimple. * gimple.h (gimple_build_eh_dispatch): Return a gimple_eh_dispatch rather than a plain gimple. (gimple_eh_dispatch_region): Require a const_gimple_eh_dispatch rather than a plain const_gimple. (gimple_eh_dispatch_set_region): Require a gimple_eh_dispatch rather than a plain gimple. * tree-cfg.c (make_edges): Add a checked cast to gimple_eh_dispatch within GIMPLE_EH_DISPATCH case of switch statement. (gimple_verify_flow_info): Likewise. (gimple_redirect_edge_and_branch): Likewise. (move_stmt_r): Likewise, adding a local. * tree-eh.c (emit_eh_dispatch): Convert local from gimple to gimple_eh_dispatch. (make_eh_dispatch_edges): Require a gimple_eh_dispatch rather than a plain gimple. (redirect_eh_dispatch_edge): Likewise. (lower_eh_dispatch): Likewise. (execute_lower_eh_dispatch): Add a checked cast to gimple_eh_dispatch. (mark_reachable_handlers): Likewise. (verify_eh_dispatch_edge): Require a gimple_eh_dispatch rather than a plain gimple. * tree-eh.h (make_eh_dispatch_edges): Likewise. (redirect_eh_dispatch_edge): Likewise. (verify_eh_dispatch_edge): Likewise. * tree-inline.c (remap_gimple_stmt): Add a checked cast to gimple_eh_dispatch within GIMPLE_EH_DISPATCH case of switch statement, adding a local. (copy_edges_for_bb): Add a checked cast to gimple_eh_dispatch.
Diffstat (limited to 'gcc/gimple.c')
-rw-r--r--gcc/gimple.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/gimple.c b/gcc/gimple.c
index c94611a66fd..2b008699a03 100644
--- a/gcc/gimple.c
+++ b/gcc/gimple.c
@@ -760,11 +760,11 @@ gimple_build_switch (tree index, tree default_label, vec<tree> args)
/* Build a GIMPLE_EH_DISPATCH statement. */
-gimple
+gimple_eh_dispatch
gimple_build_eh_dispatch (int region)
{
- gimple_statement_eh_dispatch *p =
- as_a <gimple_statement_eh_dispatch *> (
+ gimple_eh_dispatch p =
+ as_a <gimple_eh_dispatch> (
gimple_build_with_ops (GIMPLE_EH_DISPATCH, ERROR_MARK, 0));
p->region = region;
return p;