(rest_of_decl_compilation): Call `dwarfout_file_scope_decl' immediately for...
authorRichard Stallman <rms@gnu.org>
Wed, 16 Sep 1992 02:55:26 +0000 (02:55 +0000)
committerRichard Stallman <rms@gnu.org>
Wed, 16 Sep 1992 02:55:26 +0000 (02:55 +0000)
(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

gcc/toplev.c

index 061edbf601af94a701b4a1d50029b0979c13538b..184ce04b35586e6b11ed18d23fdada0731bb94ab 100644 (file)
@@ -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.  */