re PR debug/92664 (Wrong .debug_line section information when compiling stdin input...
authorJakub Jelinek <jakub@redhat.com>
Wed, 27 Nov 2019 00:23:39 +0000 (01:23 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 27 Nov 2019 00:23:39 +0000 (01:23 +0100)
PR debug/92664
* dwarf2out.c (lookup_filename): Use "<stdin>" instead of "".

From-SVN: r278752

gcc/ChangeLog
gcc/dwarf2out.c

index 205c48977515f3d6e8b96640853f53a5f9d699a4..ecade7ba155d031b210a99967ab6f6df00f7469a 100644 (file)
@@ -1,3 +1,8 @@
+2019-11-27  Jakub Jelinek  <jakub@redhat.com>
+
+       PR debug/92664
+       * dwarf2out.c (lookup_filename): Use "<stdin>" instead of "".
+
 2019-11-26  Martin Sebor  <msebor@redhat.com>
 
        PR tree-optimization/92683
index 9f1d921ddadfae2d6670d8978a02d05f1b9b72a7..6fb345b38b09aa56382e00e312f1b8c77cb766a8 100644 (file)
@@ -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);