aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2003-02-04 14:30:02 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2003-02-04 14:30:02 +0100
commit79c758fbcf8494e1bfb33a42df55c6586e5ef04b (patch)
treed0dc71a769d3162df179d6cb3017e91d74dbe58e /gcc/dwarf2out.c
parent5b59406b2ee2f879d9ff22d5991984ed401a289c (diff)
downloadgcc-79c758fbcf8494e1bfb33a42df55c6586e5ef04b.zip
gcc-79c758fbcf8494e1bfb33a42df55c6586e5ef04b.tar.gz
gcc-79c758fbcf8494e1bfb33a42df55c6586e5ef04b.tar.bz2
dwarf2out.c (dwarf2out_finish): Add AT_comp_dir attribute even if input file name is absolute...
* dwarf2out.c (dwarf2out_finish): Add AT_comp_dir attribute even if input file name is absolute, but one of the includes is relative. From-SVN: r62377
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 64aac19..7f1418d 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -12663,6 +12663,16 @@ dwarf2out_finish (input_filename)
add_name_attribute (comp_unit_die, input_filename);
if (input_filename[0] != DIR_SEPARATOR)
add_comp_dir_attribute (comp_unit_die);
+ else if (get_AT (comp_unit_die, DW_AT_comp_dir) == NULL)
+ {
+ size_t i;
+ for (i = 1; i < VARRAY_ACTIVE_SIZE (file_table); i++)
+ if (VARRAY_CHAR_PTR (file_table, i)[0] != DIR_SEPARATOR)
+ {
+ add_comp_dir_attribute (comp_unit_die);
+ break;
+ }
+ }
/* Traverse the limbo die list, and add parent/child links. The only
dies without parents that should be here are concrete instances of