aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2020-04-02 16:45:28 +0200
committerRichard Biener <rguenther@suse.de>2020-04-02 16:48:31 +0200
commit54af95767e887d63dc332731738e642536d87a48 (patch)
tree037cffb0aaf6160c520072e32b8e91f7025a183c
parent879bc686a0aac4277532fc2aa18704c125fb0c45 (diff)
downloadgcc-54af95767e887d63dc332731738e642536d87a48.zip
gcc-54af95767e887d63dc332731738e642536d87a48.tar.gz
gcc-54af95767e887d63dc332731738e642536d87a48.tar.bz2
debug/94450 - remove DW_TAG_imported_unit generated in LTRANS units
This removes the DW_TAG_imported_unit we generate for each referenced early debug unit in LTRANS units. They are more harmful than they do good and the semantics can be read in a way making it even wrong. 2020-04-02 Richard Biener <rguenther@suse.de> PR debug/94450 * dwarf2out.c (dwarf2out_early_finish): Remove code emitting DW_TAG_imported_unit.
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/dwarf2out.c18
2 files changed, 6 insertions, 18 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 671411e..8a30281 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2020-04-02 Richard Biener <rguenther@suse.de>
+
+ PR debug/94450
+ * dwarf2out.c (dwarf2out_early_finish): Remove code emitting
+ DW_TAG_imported_unit.
+
2020-04-02 Maciej W. Rozycki <macro@wdc.com>
* doc/install.texi (Specific) <riscv32-*-elf, riscv32-*-linux>
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 378a273..d68367e 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -32040,24 +32040,6 @@ dwarf2out_early_finish (const char *filename)
sure to adjust the phase after annotating the LTRANS CU DIE. */
if (in_lto_p)
{
- /* Force DW_TAG_imported_unit to be created now, otherwise
- we might end up without it or ordered after DW_TAG_inlined_subroutine
- referencing DIEs from it. */
- if (! flag_wpa && flag_incremental_link != INCREMENTAL_LINK_LTO)
- {
- unsigned i;
- tree tu;
- if (external_die_map)
- FOR_EACH_VEC_SAFE_ELT (all_translation_units, i, tu)
- if (sym_off_pair *desc = external_die_map->get (tu))
- {
- dw_die_ref import = new_die (DW_TAG_imported_unit,
- comp_unit_die (), NULL_TREE);
- add_AT_external_die_ref (import, DW_AT_import,
- desc->sym, desc->off);
- }
- }
-
early_dwarf_finished = true;
if (dump_file)
{