This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][2/n] Drop DW_AT_name for LTO produced unit DIEs
- From: Richard Biener <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Jakub Jelinek <jakub at redhat dot com>
- Date: Wed, 11 Feb 2015 14:18:25 +0100 (CET)
- Subject: Re: [PATCH][2/n] Drop DW_AT_name for LTO produced unit DIEs
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot LSU dot 2 dot 11 dot 1502111312050 dot 7434 at zhemvz dot fhfr dot qr>
On Wed, 11 Feb 2015, Richard Biener wrote:
>
> Testing in progress.
>
> Ok?
So it was said that retaining something like <artificial> is better.
Thus the following.
LTO bootstrapped & tested on x86_64-unknown-linux-gnu - ok?
Thanks,
Richard.
2015-02-11 Richard Biener <rguenther@suse.de>
PR lto/65015
* dwarf2out.c (dwarf2out_finish): Use <artificial> as DW_AT_name
for LTO produced CUs.
Index: gcc/dwarf2out.c
===================================================================
--- gcc/dwarf2out.c (revision 220613)
+++ gcc/dwarf2out.c (working copy)
@@ -24521,8 +24521,13 @@ dwarf2out_finish (const char *filename)
gen_remaining_tmpl_value_param_die_attribute ();
/* 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));
+ dwarf2out_init to avoid complications with PCH.
+ For LTO produced units use a fixed artificial name to avoid
+ leaking tempfile names into the dwarf. */
+ if (!in_lto_p)
+ add_name_attribute (comp_unit_die (), remap_debug_filename (filename));
+ else
+ add_name_attribute (comp_unit_die (), "<artificial>");
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)