aboutsummaryrefslogtreecommitdiff
path: root/gcc/objc
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.demon.co.uk>2001-10-21 21:03:48 +0000
committerNeil Booth <neil@gcc.gnu.org>2001-10-21 21:03:48 +0000
commit77b1a9217b8359f417c7e090e857c464d2e8778a (patch)
tree077954c4a4f3e25d4a7bfbc4efdc3428750adc5c /gcc/objc
parent5297e08564adcb6d396d0870df9c1df1d2c6aab9 (diff)
downloadgcc-77b1a9217b8359f417c7e090e857c464d2e8778a.zip
gcc-77b1a9217b8359f417c7e090e857c464d2e8778a.tar.gz
gcc-77b1a9217b8359f417c7e090e857c464d2e8778a.tar.bz2
langhooks.c (lang_hook_default_do_nothing, [...]): New defaults.
* langhooks.c (lang_hook_default_do_nothing, lang_hook_default_decode_option): New defaults. * langhooks.h: Make hooks unconditional and non-NULL. * toplev.c (compile_file, toplev_main): Update. * toplev.h: Update comments. * objc/objc-act.c (lang_hooks): Update to new paradigm. From-SVN: r46396
Diffstat (limited to 'gcc/objc')
-rw-r--r--gcc/objc/objc-act.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index 9da8ba0..8cf0286 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -58,6 +58,7 @@ Boston, MA 02111-1307, USA. */
#include "cpplib.h"
#include "debug.h"
#include "target.h"
+#include "langhooks.h"
/* This is the default way of generating a method name. */
/* I am not sure it is really correct.
@@ -449,12 +450,17 @@ static int generating_instance_variables = 0;
static int print_struct_values = 0;
+#undef LANG_HOOKS_INIT
+#define LANG_HOOKS_INIT objc_init
+#undef LANG_HOOKS_INIT_OPTIONS
+#define LANG_HOOKS_INIT_OPTIONS objc_init_options
+#undef LANG_HOOKS_DECODE_OPTION
+#define LANG_HOOKS_DECODE_OPTION objc_decode_option
+#undef LANG_HOOKS_POST_OPTIONS
+#define LANG_HOOKS_POST_OPTIONS objc_post_options
+
/* Each front end provides its own. */
-struct lang_hooks lang_hooks = {objc_init,
- NULL, /* objc_finish */
- objc_init_options,
- objc_decode_option,
- objc_post_options};
+struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
/* Post-switch processing. */
static void