aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2004-06-19 12:34:23 -0700
committerRichard Henderson <rth@gcc.gnu.org>2004-06-19 12:34:23 -0700
commit7c34ced1a25f62ed12b1bf1158167fe157b60ae7 (patch)
tree8c9a0bb986a33bc83bc0dbbec28fa39603c3a2c6 /gcc/gimplify.c
parentebca59c355524893ef3facf6ad12074e4661348e (diff)
downloadgcc-7c34ced1a25f62ed12b1bf1158167fe157b60ae7.zip
gcc-7c34ced1a25f62ed12b1bf1158167fe157b60ae7.tar.gz
gcc-7c34ced1a25f62ed12b1bf1158167fe157b60ae7.tar.bz2
c-common.c, c-common.h (lang_gimplify_stmt): Remove.
* c-common.c, c-common.h (lang_gimplify_stmt): Remove. * c-gimplify.c: Remove unnecessary prototypes. (c_gimplify_stmt): Merge into ... (c_gimplify_expr): ... here. Don't play with prep_stmt. * c-semantics.c (prep_stmt): Remove. * gimplify.c (annotate_one_with_locus): Break out from ... (annotate_all_with_locus): ... here. (gimplify_expr): Add locus to expressions even if pre/post queues are not present. cp/ * cp-gimplify.c: Remove unnecessary prototypes. (cp_gimplify_stmt): Merge into ... (cp_gimplify_expr): ... here. Move to end of file. Handle stmts_are_full_exprs_p frobbing. * cp-tree.h (cp_gimplify_stmt): Remove. * pt.c (tsubst_expr): Merge prep_stmt and unify. * tree.c (init_tree): Don't set lang_gimplify_stmt. From-SVN: r83397
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index 2e7d30e..92c52a9 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -563,6 +563,15 @@ should_carry_locus_p (tree stmt)
return true;
}
+static void
+annotate_one_with_locus (tree t, location_t locus)
+{
+ if (IS_EXPR_CODE_CLASS (TREE_CODE_CLASS (TREE_CODE (t)))
+ && ! EXPR_HAS_LOCATION (t)
+ && should_carry_locus_p (t))
+ annotate_with_locus (t, locus);
+}
+
void
annotate_all_with_locus (tree *stmt_p, location_t locus)
{
@@ -583,10 +592,7 @@ annotate_all_with_locus (tree *stmt_p, location_t locus)
abort ();
#endif
- if (IS_EXPR_CODE_CLASS (TREE_CODE_CLASS (TREE_CODE (t)))
- && ! EXPR_HAS_LOCATION (t)
- && should_carry_locus_p (t))
- annotate_with_locus (t, locus);
+ annotate_one_with_locus (t, locus);
}
}
@@ -3558,6 +3564,10 @@ gimplify_expr (tree *expr_p, tree *pre_p, tree *post_p,
annotate_all_with_locus (&internal_pre, input_location);
*expr_p = internal_pre;
}
+ else if (TREE_CODE (*expr_p) == STATEMENT_LIST)
+ annotate_all_with_locus (expr_p, input_location);
+ else
+ annotate_one_with_locus (*expr_p, input_location);
goto out;
}