From: Richard Stallman Date: Wed, 16 Sep 1992 02:55:26 +0000 (+0000) Subject: (rest_of_decl_compilation): Call `dwarfout_file_scope_decl' immediately for... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fcc415d4592f5ea52f5e90fc7f58557b7bd1d12a;p=gcc.git (rest_of_decl_compilation): Call `dwarfout_file_scope_decl' immediately for... (rest_of_decl_compilation): Call `dwarfout_file_scope_decl' immediately for actual *definitions* of file-scope variables (and file-scope typedefs too). From-SVN: r2135 --- diff --git a/gcc/toplev.c b/gcc/toplev.c index 061edbf601a..184ce04b355 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -2072,6 +2072,13 @@ rest_of_decl_compilation (decl, asmspec, top_level, at_end) && TREE_CODE (decl) == TYPE_DECL) TIMEVAR (symout_time, sdbout_symbol (decl, 0)); #endif +#ifdef DWARF_DEBUGGING_INFO + if (write_symbols == DWARF_DEBUG + && top_level + && (TREE_CODE (decl) == TYPE_DECL + || (TREE_CODE (decl) == VAR_DECL && DECL_INITIAL (decl)))) + TIMEVAR (symout_time, dwarfout_file_scope_decl (decl, 0)); +#endif } /* Called after finishing a record, union or enumeral type. */