diff options
author | Ximin Luo <infinity0@pwned.gg> | 2016-10-24 12:57:27 +0100 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2016-10-24 11:57:27 +0000 |
commit | 89cc66c4786c9af4251dc146b3e37eb1cce2558e (patch) | |
tree | 50f226ba04019b5bb110b9f76dc737fd9750a19c /gcc/dwarf2out.c | |
parent | c101fad870ddf376d5722e5b2a9ee0f32888d056 (diff) | |
download | gcc-89cc66c4786c9af4251dc146b3e37eb1cce2558e.zip gcc-89cc66c4786c9af4251dc146b3e37eb1cce2558e.tar.gz gcc-89cc66c4786c9af4251dc146b3e37eb1cce2558e.tar.bz2 |
re PR debug/77985 (DW_AT_comp_dir is omitted when filename is absolute and the file does not contain a specific typedef)
2016-10-24 Ximin Luo <infinity0@pwned.gg>
PR debug/77985
* dwarf2out.c (file_table_relative_p): Remove.
(gen_compile_unit_die, dwarf2out_early_finish): Emit DW_AT_comp_dir
also for absolute paths.
* doc/tm.texi: Update.
* doc/tm.texi.in (SDB and DWARF) <TARGET_FORCE_AT_COMP_DIR>: Remove.
* target.def (force_at_comp_dir): Remove hook.
* config/darwin.h (TARGET_FORCE_AT_COMP_DIR): Remove define.
From-SVN: r241473
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 4683e1c..b059ed2 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -22005,7 +22005,7 @@ gen_compile_unit_die (const char *filename) { add_name_attribute (die, filename); /* Don't add cwd for <built-in>. */ - if (!IS_ABSOLUTE_PATH (filename) && filename[0] != '<') + if (filename[0] != '<') add_comp_dir_attribute (die); } @@ -26368,20 +26368,6 @@ prune_unused_types (void) prune_unmark_dies (ctnode->root_die); } -/* Set the parameter to true if there are any relative pathnames in - the file table. */ -int -file_table_relative_p (dwarf_file_data **slot, bool *p) -{ - struct dwarf_file_data *d = *slot; - if (!IS_ABSOLUTE_PATH (d->filename)) - { - *p = true; - return 0; - } - return 1; -} - /* Helpers to manipulate hash table of comdat type units. */ struct comdat_type_hasher : nofree_ptr_hash <comdat_type_node> @@ -28195,15 +28181,7 @@ dwarf2out_early_finish (const char *filename) /* Add the name for the main input file now. We delayed this from dwarf2out_init to avoid complications with PCH. */ add_name_attribute (comp_unit_die (), remap_debug_filename (filename)); - if (!IS_ABSOLUTE_PATH (filename) || targetm.force_at_comp_dir) - add_comp_dir_attribute (comp_unit_die ()); - else if (get_AT (comp_unit_die (), DW_AT_comp_dir) == NULL) - { - bool p = false; - file_table->traverse<bool *, file_table_relative_p> (&p); - if (p) - add_comp_dir_attribute (comp_unit_die ()); - } + add_comp_dir_attribute (comp_unit_die ()); /* With LTO early dwarf was really finished at compile-time, so make sure to adjust the phase after annotating the LTRANS CU DIE. */ |