DWARF: do not emit DW_TAG_variable to materialize DWARF procedures
Hello,
For -gdwarf-3 and newer, the DWARF back-end sometimes generates DWARF
procedures to factorize complex location descriptions. DWARF procedures
can be materialized as DW_TAG_dwarf_procedure DIEs, but actually any DIE
that can hold a DW_AT_location attribute is also accepted.
Unlike what I thought at some point, the DW_TAG_dwarf_procedure tag was
introduced in the DWARFv3 standard, not the DWARFv4 one, so the back-end
can always emit DW_TAG_dwarf_procedure DIEs, as this simplifies code and
prevents the types pruning pass from missing a DWARF procedure.
Boostrapped and regtested on x86_64-linux: no regression. Ok to commit?
Thank you in advance!
gcc/
* dwarf2out.c (copy_dwarf_procedure): Remove obsolete comment.
(new_dwarf_proc_die): Emit DW_TAG_dwarf_procedure DIEs even for
-gdwarf-3.
(function_to_dwarf_procedure): Update comment.
From-SVN: r239575