dwarf2out.c (add_name_and_src_coords_attributes): Add NO_LINKAGE_NAME argument, don...
authorJakub Jelinek <jakub@redhat.com>
Tue, 1 Nov 2016 18:35:06 +0000 (19:35 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 1 Nov 2016 18:35:06 +0000 (19:35 +0100)
commit70d288130f1296bebb1dcf30d8585916b7c8c850
tree2920e41a8d3651ef0bff5eaf8128439394b00442
parente592dd625d5ad569561b081a01ff4a6be24693e0
dwarf2out.c (add_name_and_src_coords_attributes): Add NO_LINKAGE_NAME argument, don't call add_linkage_name if it is true.

* dwarf2out.c (add_name_and_src_coords_attributes): Add NO_LINKAGE_NAME
argument, don't call add_linkage_name if it is true.
(gen_variable_die): For C++ inline static data members, consider the
initial call when old_die is NULL to be declaration and call
add_name_and_src_coords_attributes in that case with true as
NO_LINKAGE_NAME.  Add DW_AT_inline attribute if needed.
(gen_member_die): For C++ inline static data members, emit a
definition DIE right away in DW_TAG_compile_unit context.
cp/
* cp-objcp-common.c (cp_decl_dwarf_attribute): Handle DW_AT_inline.
testsuite/
* g++.dg/debug/dwarf2/inline-var-1.C: New test.

From-SVN: r241753
gcc/ChangeLog
gcc/cp/ChangeLog
gcc/cp/cp-objcp-common.c
gcc/dwarf2out.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/debug/dwarf2/inline-var-1.C [new file with mode: 0644]