Makefile.in (dbxout.o): Depend on ggc.h.
authorMark Mitchell <mark@codesourcery.com>
Sat, 6 Nov 1999 18:00:18 +0000 (18:00 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Sat, 6 Nov 1999 18:00:18 +0000 (18:00 +0000)
* Makefile.in (dbxout.o): Depend on ggc.h.
(dwarf2out.o): Likewise.
(xcoffout.o): Likewise.
* dbxout.c: Include ggc.h.
(dbxout_init): Register lastfile as a root.
* dwarf2out.c: Include ggc.h.
(dwarf2out_line): Register lastfile as a root.
* xcoffout.c: Include ggc.h.
(xcoffout_source_line): Register xcoff_lastfile as a root.

From-SVN: r30433

gcc/ChangeLog
gcc/Makefile.in
gcc/dbxout.c
gcc/dwarf2out.c
gcc/xcoffout.c

index 686475937e82c1af5b280c4b5f09e2f0e41df2a2..ecca2e557754f2887212c21372179c446b1a5fb2 100644 (file)
@@ -1,3 +1,15 @@
+Sat Nov  6 09:57:59 1999  Mark Mitchell  <mark@codesourcery.com>
+
+       * Makefile.in (dbxout.o): Depend on ggc.h.
+       (dwarf2out.o): Likewise.
+       (xcoffout.o): Likewise.
+       * dbxout.c: Include ggc.h.
+       (dbxout_init): Register lastfile as a root.
+       * dwarf2out.c: Include ggc.h.
+       (dwarf2out_line): Register lastfile as a root.
+       * xcoffout.c: Include ggc.h.
+       (xcoffout_source_line): Register xcoff_lastfile as a root.
+
 Sat Nov  6 09:52:09 1999  Richard Henderson  <rth@cygnus.com>
 
        * i386.md (movdf_1, movxf_1): Earlyclobber general regs destination.
index f92b4d4d91f6720cdc98a801115ede7d261e931a..e0f5db974c0f58368ba640100afd0193b91f5152 100644 (file)
@@ -1506,7 +1506,7 @@ optabs.o : optabs.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h  \
    toplev.h ggc.h
 dbxout.o : dbxout.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) flags.h $(REGS_H) \
    insn-config.h reload.h gstab.h xcoffout.h defaults.h output.h dbxout.h \
-   toplev.h
+   toplev.h gcc.h
 sdbout.o : sdbout.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) flags.h except.h \
    function.h $(EXPR_H) output.h hard-reg-set.h $(REGS_H) defaults.h real.h \
    insn-config.h $(srcdir)/../include/obstack.h xcoffout.h c-pragma.h \
@@ -1515,9 +1515,10 @@ dwarfout.o : dwarfout.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) dwarf.h \
    flags.h insn-config.h reload.h output.h defaults.h toplev.h dwarfout.h
 dwarf2out.o : dwarf2out.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) dwarf2.h \
    flags.h insn-config.h reload.h output.h defaults.h \
-   hard-reg-set.h $(REGS_H) $(EXPR_H) toplev.h dwarf2out.h dyn-string.h
+   hard-reg-set.h $(REGS_H) $(EXPR_H) toplev.h dwarf2out.h dyn-string.h \
+   ggc.h
 xcoffout.o : xcoffout.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) xcoffout.h \
-   flags.h toplev.h output.h dbxout.h
+   flags.h toplev.h output.h dbxout.h ggc.h
 emit-rtl.o : emit-rtl.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
    function.h $(REGS_H) insn-config.h $(RECOG_H) real.h ggc.h \
    $(EXPR_H) $(srcdir)/../include/obstack.h hard-reg-set.h bitmap.h toplev.h
index 5357b02338c5144218712a899ad2c68800962cd1..70051944ca31b97203e7f926891689d29b14f8ae 100644 (file)
@@ -81,6 +81,7 @@ Boston, MA 02111-1307, USA.  */
 #include "dbxout.h"
 #include "toplev.h"
 #include "tm_p.h"
+#include "ggc.h"
 
 #ifdef XCOFF_DEBUGGING_INFO
 #include "xcoffout.h"
@@ -463,6 +464,8 @@ dbxout_init (asm_file, input_file_name, syms)
      and output them all, except for those already output.  */
 
   dbxout_typedefs (syms);
+
+  ggc_add_string_root ((char **) &lastfile, 1);
 }
 
 /* Output any typedef names for types described by TYPE_DECLs in SYMS,
index 41fe6cb174dff797b006e8d5de1a0d8973ea6ed1..232ec81fca8aea49a743aeba79201250b5bef24f 100644 (file)
@@ -44,6 +44,7 @@ Boston, MA 02111-1307, USA.  */
 #include "dwarf2out.h"
 #include "toplev.h"
 #include "dyn-string.h"
+#include "ggc.h"
 
 /* We cannot use <assert.h> in GCC source, since that would include
    GCC's assert.h, which may not be compatible with the host compiler.  */
@@ -9698,6 +9699,9 @@ dwarf2out_line (filename, line)
          /* Emit the .file and .loc directives understood by GNU as.  */
          if (lastfile == 0 || strcmp (filename, lastfile))
            {
+             if (lastfile == 0)
+               ggc_add_string_root ((char **) &lastfile, 1);
+
              fprintf (asm_out_file, "\t.file 0 \"%s\"\n", filename);
              lastfile = filename;
            }
index 6ee08ec2fb103aab4a534ad8dc8d80e4583799e5..ae531504f10e1c500035c6a356972c51e315683b 100644 (file)
@@ -31,6 +31,7 @@ Boston, MA 02111-1307, USA.  */
 #include "flags.h"
 #include "toplev.h"
 #include "output.h"
+#include "ggc.h"
 
 #ifdef XCOFF_DEBUGGING_INFO
 
@@ -350,6 +351,9 @@ xcoffout_source_file (file, filename, inline_p)
          fprintf (file, "\n");
          xcoff_current_include_file = filename;
        }
+      
+      if (!xcoff_lastfile)
+       ggc_add_root (&xcoff_lastfile, 1);
 
       xcoff_lastfile = filename;
     }