From 13c61421ff315b27bb41e6ac8ccacdebab9d8247 Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Tue, 9 Jan 2001 10:54:01 +0000 Subject: c-lang.c (lang_hooks): Update. * c-lang.c (lang_hooks): Update. (lang_init): Rename c_init. (lang_finish): Remove. * toplev.c (compile_file): Use lang_hooks for lang_init () and lang_finish (). * toplev.h (lang_hooks): Add init () and finish (). * tree.h (lang_init, lang_finish): Remove. * cp/tree.h (lang_init, lang_finish): Remove. * cp/decl2.c (cxx_post_options, lang_hooks): Move to cp/lex.c. * cp/lex.c (cxx_init, cxx_finish, cxx_post_options, lang_hooks): New. (lang_init, lang_finish): Remove. * f/com.c (lang_init, lang_finish): Rename f_init, f_finish. (lang_hooks): Update. * java/lang.c (lang_init): Rename java_init. (lang_finish): Remove. (lang_hooks): Update. * objc/objc-act.c (lang_init): Rename objc_init. (lang_finish): Remove. (lang_hoooks): Update. From-SVN: r38828 --- gcc/toplev.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'gcc/toplev.h') diff --git a/gcc/toplev.h b/gcc/toplev.h index 05fca01..f0c37f8 100644 --- a/gcc/toplev.h +++ b/gcc/toplev.h @@ -133,10 +133,16 @@ extern int sorrycount; extern const char *progname; -/* Language-specific hooks. */ +/* Language-specific hooks. Can be NULL unless otherwise specified. */ struct lang_hooks { - /* If non-NULL, called when all command line options have been processed. */ + /* Called first, to initialize the front end. */ + void (*init) PARAMS ((void)); + + /* Called last, as a finalizer. */ + void (*finish) PARAMS ((void)); + + /* Called when all command line options have been processed. */ void (*post_options) PARAMS ((void)); }; -- cgit v1.1