aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorJames E Wilson <wilson@specifixinc.com>2005-05-03 18:32:08 +0000
committerJim Wilson <wilson@gcc.gnu.org>2005-05-03 11:32:08 -0700
commit26ba801a791ccd9dff5923e5e7429cea4ae1f3be (patch)
tree44129144871a2f81a93e6227265e5887aea19db9 /gcc/dwarf2out.c
parentccf08a6ed7ade866dab79e1c0dc853bae887f9e2 (diff)
downloadgcc-26ba801a791ccd9dff5923e5e7429cea4ae1f3be.zip
gcc-26ba801a791ccd9dff5923e5e7429cea4ae1f3be.tar.gz
gcc-26ba801a791ccd9dff5923e5e7429cea4ae1f3be.tar.bz2
Fix corrupted dwarf2 file table with -fno-eliminate-unused-debug-types.
* dwarf2out.c (lookup_filename): Call maybe_emit_file. From-SVN: r99170
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 292a835..e9611d8 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -13184,6 +13184,14 @@ lookup_filename (const char *file_name)
VARRAY_PUSH_CHAR_PTR (file_table, save_file_name);
VARRAY_PUSH_UINT (file_table_emitted, 0);
+ /* If the assembler is emitting the file table, and we aren't eliminating
+ unused debug types, then we must emit .file here. If we are eliminating
+ unused debug types, then this will be done by the maybe_emit_file call in
+ prune_unused_types_walk_attribs. */
+
+ if (DWARF2_ASM_LINE_DEBUG_INFO && ! flag_eliminate_unused_debug_types)
+ maybe_emit_file (i);
+
return i;
}