aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/gfortran.h
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2010-09-16 18:53:35 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2010-09-16 18:53:35 +0200
commit4d42b5cd6f4b014ae22827ad570f241d4437d5fa (patch)
treeff17985e2f0017ae579952341a586002328cafb1 /gcc/fortran/gfortran.h
parent815248b197b3d1c5dbeebf2d55bca0af899bdebb (diff)
downloadgcc-4d42b5cd6f4b014ae22827ad570f241d4437d5fa.zip
gcc-4d42b5cd6f4b014ae22827ad570f241d4437d5fa.tar.gz
gcc-4d42b5cd6f4b014ae22827ad570f241d4437d5fa.tar.bz2
gfortran.h (walk_code_fn_t, [...]): New types.
* gfortran.h (walk_code_fn_t, walk_expr_fn_t): New types. (gfc_expr_walker, gfc_code_walker): New prototypes. * frontend-passes.c (gfc_expr_walker, gfc_code_walker): New functions. (WALK_SUBEXPR, WALK_SUBEXPR_TAIL, WALK_SUBCODE): Define. (optimize_namespace): Use gfc_code_walker. (optimize_code, optimize_expr): Rewritten as gfc_code_walker hooks. (optimize_expr_0, optimize_code_node, optimize_actual_arglist): Removed. (optimize_assignment): Don't call optimize_expr_0. From-SVN: r164342
Diffstat (limited to 'gcc/fortran/gfortran.h')
-rw-r--r--gcc/fortran/gfortran.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h
index 056009a..947f1ff 100644
--- a/gcc/fortran/gfortran.h
+++ b/gcc/fortran/gfortran.h
@@ -2886,4 +2886,10 @@ gfc_symtree* gfc_get_tbp_symtree (gfc_symtree**, const char*);
void gfc_run_passes (gfc_namespace *);
+typedef int (*walk_code_fn_t) (gfc_code **, int *, void *);
+typedef int (*walk_expr_fn_t) (gfc_expr **, int *, void *);
+
+int gfc_expr_walker (gfc_expr **, walk_expr_fn_t, void *);
+int gfc_code_walker (gfc_code **, walk_code_fn_t, walk_expr_fn_t, void *);
+
#endif /* GCC_GFORTRAN_H */