diff options
author | Neil Booth <neil@daikokuya.demon.co.uk> | 2001-10-21 21:03:48 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2001-10-21 21:03:48 +0000 |
commit | 77b1a9217b8359f417c7e090e857c464d2e8778a (patch) | |
tree | 077954c4a4f3e25d4a7bfbc4efdc3428750adc5c /gcc/langhooks.h | |
parent | 5297e08564adcb6d396d0870df9c1df1d2c6aab9 (diff) | |
download | gcc-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/langhooks.h')
-rw-r--r-- | gcc/langhooks.h | 57 |
1 files changed, 20 insertions, 37 deletions
diff --git a/gcc/langhooks.h b/gcc/langhooks.h index e3067fb..0b4d72f 100644 --- a/gcc/langhooks.h +++ b/gcc/langhooks.h @@ -1,4 +1,4 @@ -/* Macros to initialize the lang_hooks data structure. +/* Default macros to initialize the lang_hooks data structure. Copyright 2001 Free Software Foundation, Inc. Contributed by Alexandre Oliva <aoliva@redhat.com> @@ -22,26 +22,25 @@ Boston, MA 02111-1307, USA. */ #ifndef GCC_LANG_HOOKS_H #define GCC_LANG_HOOKS_H -/* Older hooks, that don't go in sub-structures for backward - compatibility. */ -#ifndef LANG_HOOKS_INIT -#define LANG_HOOKS_INIT NULL -#endif -#ifndef LANG_HOOKS_FINISH -#define LANG_HOOKS_FINISH NULL -#endif -#ifndef LANG_HOOKS_INIT_OPTIONS -#define LANG_HOOKS_INIT_OPTIONS NULL -#endif -#ifndef LANG_HOOKS_DECODE_OPTION -#define LANG_HOOKS_DECODE_OPTION NULL -#endif -#ifndef LANG_HOOKS_POST_OPTIONS -#define LANG_HOOKS_POST_OPTIONS NULL -#endif -#ifndef LANG_HOOKS_HONOR_READONLY -#define LANG_HOOKS_HONOR_READONLY 0 -#endif +/* Note to creators of new hooks: + + The macros in this file should NOT be surrounded by a + #ifdef...#endif pair, since this file declares the defaults. Each + front end overrides any hooks it wishes to, in the file containing + its struct lang_hooks, AFTER including this file. */ + +/* See toplev.h for the definition and documentation of each hook. */ + +extern void lang_hook_default_do_nothing PARAMS ((void)); +extern int lang_hook_default_decode_option PARAMS ((int, char **)); + +#define LANG_HOOKS_INIT lang_hook_default_do_nothing +#define LANG_HOOKS_FINISH lang_hook_default_do_nothing +#define LANG_HOOKS_INIT_OPTIONS lang_hook_default_do_nothing +#define LANG_HOOKS_DECODE_OPTION lang_hook_default_decode_option +#define LANG_HOOKS_POST_OPTIONS lang_hook_default_do_nothing + +#define LANG_HOOKS_HONOR_READONLY false /* Declarations of default tree inlining hooks. */ tree tree_inlining_default_hook_walk_subtrees PARAMS ((tree*, int *, @@ -60,38 +59,22 @@ tree tree_inlining_default_hook_copy_res_decl_for_inlining PARAMS ((tree, tree, int tree_inlining_default_hook_anon_aggr_type_p PARAMS ((tree)); /* Tree inlining hooks. */ -#ifndef LANG_HOOKS_TREE_INLINING_WALK_SUBTREES #define LANG_HOOKS_TREE_INLINING_WALK_SUBTREES \ tree_inlining_default_hook_walk_subtrees -#endif -#ifndef LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN #define LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN \ tree_inlining_default_hook_cannot_inline_tree_fn -#endif -#ifndef LANG_HOOKS_TREE_INLINING_DISREGARD_INLINE_LIMITS #define LANG_HOOKS_TREE_INLINING_DISREGARD_INLINE_LIMITS \ tree_inlining_default_hook_disregard_inline_limits -#endif -#ifndef LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS #define LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS \ tree_inlining_default_hook_add_pending_fn_decls -#endif -#ifndef LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P #define LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P \ tree_inlining_default_hook_tree_chain_matters_p -#endif -#ifndef LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P #define LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P \ tree_inlining_default_hook_auto_var_in_fn_p -#endif -#ifndef LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING #define LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING \ tree_inlining_default_hook_copy_res_decl_for_inlining -#endif -#ifndef LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P #define LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P \ tree_inlining_default_hook_anon_aggr_type_p -#endif #define LANG_HOOKS_TREE_INLINING_INITIALIZER { \ LANG_HOOKS_TREE_INLINING_WALK_SUBTREES, \ |