summaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2019-11-27 01:23:39 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2019-11-27 01:23:39 +0100
commit88b34a4811a0a5237138bbd6700202c2f3569c7d (patch)
tree02948ba940972337d3affabe0a279d9805ef578a /gcc/dwarf2out.c
parentb592c0ea8646089272920ce82ff504e7115056e6 (diff)
re PR debug/92664 (Wrong .debug_line section information when compiling stdin input with -g3)
PR debug/92664 * dwarf2out.c (lookup_filename): Use "<stdin>" instead of "". From-SVN: r278752
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 9f1d921ddad..6fb345b38b0 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -27118,6 +27118,9 @@ lookup_filename (const char *file_name)
if (!file_name)
return NULL;
+ if (!file_name[0])
+ file_name = "<stdin>";
+
dwarf_file_data **slot
= file_table->find_slot_with_hash (file_name, htab_hash_string (file_name),
INSERT);