diff options
author | Jakub Jelinek <jakub@redhat.com> | 2016-11-01 18:35:06 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2016-11-01 18:35:06 +0000 |
commit | e705b04222377867a5af9bc5a0b98140a3b864d6 (patch) | |
tree | 2920e41a8d3651ef0bff5eaf8128439394b00442 /gcc/cp/cp-objcp-common.c | |
parent | ed1d10fb115ec6dcff69dd599fa3c5bb1606929b (diff) |
* 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.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@241753 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/cp-objcp-common.c')
-rw-r--r-- | gcc/cp/cp-objcp-common.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/cp/cp-objcp-common.c b/gcc/cp/cp-objcp-common.c index 070b64c5d82..c6f0873b2a6 100644 --- a/gcc/cp/cp-objcp-common.c +++ b/gcc/cp/cp-objcp-common.c @@ -199,6 +199,16 @@ cp_decl_dwarf_attribute (const_tree decl, int attr) return 1; break; + case DW_AT_inline: + if (VAR_P (decl) && DECL_INLINE_VAR_P (decl)) + { + if (DECL_VAR_DECLARED_INLINE_P (decl)) + return DW_INL_declared_inlined; + else + return DW_INL_inlined; + } + break; + default: break; } |