aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>1999-11-06 18:00:18 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>1999-11-06 18:00:18 +0000
commit951a525fefc72be228eb70c7fd1586be9235afab (patch)
treec0d4b74c0177a02d70e723b24982d68c7838cffb /gcc/dwarf2out.c
parente06981b09a2f0607cb85f692cb8b9fd89a72de32 (diff)
downloadgcc-951a525fefc72be228eb70c7fd1586be9235afab.zip
gcc-951a525fefc72be228eb70c7fd1586be9235afab.tar.gz
gcc-951a525fefc72be228eb70c7fd1586be9235afab.tar.bz2
Makefile.in (dbxout.o): Depend on ggc.h.
* 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
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 41fe6cb..232ec81 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -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;
}