diff options
author | austern <austern@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-02-18 18:50:05 +0000 |
---|---|---|
committer | austern <austern@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-02-18 18:50:05 +0000 |
commit | 28db4d965ab6f20bb4d7eb9ab93f1a99bf68c868 (patch) | |
tree | f2d1ae8da2b00770c1682fd0408e81e6c1fb7257 /gcc/langhooks-def.h | |
parent | 05967fa212f9583d6b1b174685474479fe4ddc7c (diff) | |
download | gcc-28db4d965ab6f20bb4d7eb9ab93f1a99bf68c868.tar.gz |
* langhooks.h, langhooks-def.h: introduce new langhook,
final_write_globals, with write_global_declarations as default.
* toplev.c: Move invocation of wrapup_global_declarations from
compile_file to new function, write_global_declarations. Change
compile_file to use final_write_globals hook. Change
wrapup_global_declarations so writing to DECL_DEFER_OUTPUT is
conditional.
* cp/cp-lang.c: Change lang hooks so that final_write_globals does
nothing for C++.
* cp/decl.c (wrapup_globals_for_namespace): Remove special
handling of global namespace.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63051 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/langhooks-def.h')
-rw-r--r-- | gcc/langhooks-def.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/langhooks-def.h b/gcc/langhooks-def.h index c38fdd8c1f6..6fc10603a7f 100644 --- a/gcc/langhooks-def.h +++ b/gcc/langhooks-def.h @@ -82,6 +82,9 @@ int lhd_tree_inlining_start_inlining PARAMS ((tree)); void lhd_tree_inlining_end_inlining PARAMS ((tree)); tree lhd_tree_inlining_convert_parm_for_inlining PARAMS ((tree, tree, tree)); +/* In toplev.c */ +void write_global_declarations PARAMS ((void)); + #define LANG_HOOKS_NAME "GNU unknown" #define LANG_HOOKS_IDENTIFIER_SIZE sizeof (struct lang_identifier) #define LANG_HOOKS_INIT lhd_do_nothing @@ -217,6 +220,7 @@ int lhd_tree_dump_type_quals PARAMS ((tree)); #define LANG_HOOKS_PUSHDECL pushdecl #define LANG_HOOKS_GETDECLS getdecls #define LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL lhd_warn_unused_global_decl +#define LANG_HOOKS_WRITE_GLOBALS write_global_declarations #define LANG_HOOKS_DECLS { \ LANG_HOOKS_PUSHLEVEL, \ @@ -226,7 +230,8 @@ int lhd_tree_dump_type_quals PARAMS ((tree)); LANG_HOOKS_SET_BLOCK, \ LANG_HOOKS_PUSHDECL, \ LANG_HOOKS_GETDECLS, \ - LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL \ + LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, \ + LANG_HOOKS_WRITE_GLOBALS \ } /* The whole thing. The structure is defined in langhooks.h. */ |