diff options
author | wilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-03 18:32:08 +0000 |
---|---|---|
committer | wilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-03 18:32:08 +0000 |
commit | 7b056f1f7c90c796ebe1265dbcf5ddb3ad4a7f5f (patch) | |
tree | 44129144871a2f81a93e6227265e5887aea19db9 /gcc/dwarf2out.c | |
parent | efb9d9ee8e1478917ccbfa1e47447d8dfb63953c (diff) | |
download | gcc-7b056f1f7c90c796ebe1265dbcf5ddb3ad4a7f5f.tar.gz |
Fix corrupted dwarf2 file table with -fno-eliminate-unused-debug-types.
* dwarf2out.c (lookup_filename): Call maybe_emit_file.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99170 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 292a8357cec..e9611d8e33d 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; } |