aboutsummaryrefslogtreecommitdiff
path: root/gcc/toplev.h
diff options
context:
space:
mode:
authorNeil Booth <neil@gcc.gnu.org>2001-01-09 10:54:01 +0000
committerNeil Booth <neil@gcc.gnu.org>2001-01-09 10:54:01 +0000
commit13c61421ff315b27bb41e6ac8ccacdebab9d8247 (patch)
tree5175214bd3273e1990f7d1c7e0d43f3853a1fc53 /gcc/toplev.h
parentfb83deef1a1438c21b65535483a4726f31862b20 (diff)
downloadgcc-13c61421ff315b27bb41e6ac8ccacdebab9d8247.zip
gcc-13c61421ff315b27bb41e6ac8ccacdebab9d8247.tar.gz
gcc-13c61421ff315b27bb41e6ac8ccacdebab9d8247.tar.bz2
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
Diffstat (limited to 'gcc/toplev.h')
-rw-r--r--gcc/toplev.h10
1 files changed, 8 insertions, 2 deletions
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));
};