aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/cp-lang.c
diff options
context:
space:
mode:
authorMatt Austern <austern@apple.com>2003-02-18 18:50:05 +0000
committerMatt Austern <austern@gcc.gnu.org>2003-02-18 18:50:05 +0000
commit2b59501bf6ed69ff30931024cf346ba6592ba9be (patch)
treef2d1ae8da2b00770c1682fd0408e81e6c1fb7257 /gcc/cp/cp-lang.c
parent131efcd8e006ff180e498a50ad47261716539346 (diff)
downloadgcc-2b59501bf6ed69ff30931024cf346ba6592ba9be.zip
gcc-2b59501bf6ed69ff30931024cf346ba6592ba9be.tar.gz
gcc-2b59501bf6ed69ff30931024cf346ba6592ba9be.tar.bz2
langhooks.h, [...]: introduce new langhook...
* 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. From-SVN: r63051
Diffstat (limited to 'gcc/cp/cp-lang.c')
-rw-r--r--gcc/cp/cp-lang.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cp/cp-lang.c b/gcc/cp/cp-lang.c
index 6dc0308..3671027 100644
--- a/gcc/cp/cp-lang.c
+++ b/gcc/cp/cp-lang.c
@@ -92,6 +92,9 @@ static bool cp_var_mod_type_p (tree);
#define LANG_HOOKS_PRINT_ERROR_FUNCTION cxx_print_error_function
#undef LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL
#define LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL cxx_warn_unused_global_decl
+#undef LANG_HOOKS_WRITE_GLOBALS
+#define LANG_HOOKS_WRITE_GLOBALS lhd_do_nothing
+
#undef LANG_HOOKS_FUNCTION_INIT
#define LANG_HOOKS_FUNCTION_INIT cxx_push_function_context