@@ -1,5 +1,14 @@
2014-10-24 David Malcolm <dmalcolm@redhat.com>
+ Concretize gimple_eh_filter_set_types and gimple_eh_filter_set_failure
+
+ * gimple.h (gimple_eh_filter_set_types): Require a gimple_eh_filter.
+ (gimple_eh_filter_set_failure): Likewise.
+ * gimple.c (gimple_copy): Add checked casts to gimple_eh_filter
+ within GIMPLE_EH_FILTER case.
+
+2014-10-24 David Malcolm <dmalcolm@redhat.com>
+
Concretize gimple_label_label
* gimple.h (gimple_label_label): Require a const_gimple_label
@@ -1686,10 +1686,15 @@ gimple_copy (gimple stmt)
break;
case GIMPLE_EH_FILTER:
- new_seq = gimple_seq_copy (gimple_eh_filter_failure (stmt));
- gimple_eh_filter_set_failure (copy, new_seq);
- t = unshare_expr (gimple_eh_filter_types (stmt));
- gimple_eh_filter_set_types (copy, t);
+ {
+ gimple_eh_filter eh_filter_stmt = as_a <gimple_eh_filter> (stmt);
+ gimple_eh_filter eh_filter_copy = as_a <gimple_eh_filter> (copy);
+ new_seq =
+ gimple_seq_copy (gimple_eh_filter_failure (eh_filter_stmt));
+ gimple_eh_filter_set_failure (eh_filter_copy, new_seq);
+ t = unshare_expr (gimple_eh_filter_types (eh_filter_stmt));
+ gimple_eh_filter_set_types (eh_filter_copy, t);
+ }
break;
case GIMPLE_EH_ELSE:
@@ -3620,25 +3620,23 @@ gimple_eh_filter_failure (gimple gs)
}
-/* Set TYPES to be the set of types handled by GIMPLE_EH_FILTER GS. */
+/* Set TYPES to be the set of types handled by GIMPLE_EH_FILTER
+ EH_FILTER_STMT. */
static inline void
-gimple_eh_filter_set_types (gimple gs, tree types)
+gimple_eh_filter_set_types (gimple_eh_filter eh_filter_stmt, tree types)
{
- gimple_statement_eh_filter *eh_filter_stmt =
- as_a <gimple_statement_eh_filter *> (gs);
eh_filter_stmt->types = types;
}
/* Set FAILURE to be the sequence of statements to execute on failure
- for GIMPLE_EH_FILTER GS. */
+ for GIMPLE_EH_FILTER EH_FILTER_STMT. */
static inline void
-gimple_eh_filter_set_failure (gimple gs, gimple_seq failure)
+gimple_eh_filter_set_failure (gimple_eh_filter eh_filter_stmt,
+ gimple_seq failure)
{
- gimple_statement_eh_filter *eh_filter_stmt =
- as_a <gimple_statement_eh_filter *> (gs);
eh_filter_stmt->failure = failure;
}
This corresponds to: [PATCH 63/89] Concretize gimple_eh_filter_set_types and gimple_eh_filter_set_failure https://gcc.gnu.org/ml/gcc-patches/2014-04/msg01166.html from the original 89-patch kit That earlier patch was approved by Jeff: > OK once prerequisites have gone in. in https://gcc.gnu.org/ml/gcc-patches/2014-05/msg00830.html gcc/ * gimple.h (gimple_eh_filter_set_types): Require a gimple_eh_filter. (gimple_eh_filter_set_failure): Likewise. * gimple.c (gimple_copy): Add checked casts to gimple_eh_filter within GIMPLE_EH_FILTER case. --- gcc/ChangeLog.gimple-classes | 9 +++++++++ gcc/gimple.c | 13 +++++++++---- gcc/gimple.h | 14 ++++++-------- 3 files changed, 24 insertions(+), 12 deletions(-)