diff options
Diffstat (limited to 'gcc/langhooks.c')
-rw-r--r-- | gcc/langhooks.c | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/gcc/langhooks.c b/gcc/langhooks.c index a6824d375c8..a1fe9955370 100644 --- a/gcc/langhooks.c +++ b/gcc/langhooks.c @@ -136,12 +136,12 @@ lhd_print_tree_nothing (FILE * ARG_UNUSED (file), { } -/* Called from check_global_declarations. */ +/* Called from check_global_declaration. */ bool lhd_warn_unused_global_decl (const_tree decl) { - /* This is what used to exist in check_global_declarations. Probably + /* This is what used to exist in check_global_declaration. Probably not many of these actually apply to non-C languages. */ if (TREE_CODE (decl) == FUNCTION_DECL && DECL_DECLARED_INLINE_P (decl)) @@ -308,14 +308,17 @@ lhd_decl_ok_for_sibcall (const_tree decl ATTRIBUTE_UNUSED) return true; } -/* lang_hooks.decls.final_write_globals: perform final processing on - global variables. */ +/* Generic global declaration processing. This is meant to be called + by the front-ends at the end of parsing. C/C++ do their own thing, + but other front-ends may call this. */ + void -write_global_declarations (void) +global_decl_processing (void) { tree globals, decl, *vec; int len, i; + timevar_stop (TV_PHASE_PARSING); timevar_start (TV_PHASE_DEFERRED); /* Really define vars that have had only a tentative definition. Really output inline functions that must actually be callable @@ -332,20 +335,9 @@ write_global_declarations (void) vec[len - i - 1] = decl; wrapup_global_declarations (vec, len); - check_global_declarations (vec, len); timevar_stop (TV_PHASE_DEFERRED); - timevar_start (TV_PHASE_OPT_GEN); - /* This lang hook is dual-purposed, and also finalizes the - compilation unit. */ - symtab->finalize_compilation_unit (); - timevar_stop (TV_PHASE_OPT_GEN); - - timevar_start (TV_PHASE_DBGINFO); - emit_debug_global_declarations (vec, len); - timevar_stop (TV_PHASE_DBGINFO); - - /* Clean up. */ + timevar_start (TV_PHASE_PARSING); free (vec); } |