diff options
author | Mark Wielaard <mjw@redhat.com> | 2014-10-05 15:25:03 +0000 |
---|---|---|
committer | Mark Wielaard <mark@gcc.gnu.org> | 2014-10-05 15:25:03 +0000 |
commit | f50592234cdef68ddc9b98b65a88a443e2c4523f (patch) | |
tree | 700ed4a22c54f19e861b8af7cede31a1ed585658 /gcc/dwarf2out.c | |
parent | 0127c169d155ecdad955d1b27cbc9e34ea981d42 (diff) | |
download | gcc-f50592234cdef68ddc9b98b65a88a443e2c4523f.zip gcc-f50592234cdef68ddc9b98b65a88a443e2c4523f.tar.gz gcc-f50592234cdef68ddc9b98b65a88a443e2c4523f.tar.bz2 |
PR debug/63239 Add DWARF representation for C++11 deleted member function.
include/ChangeLog
* dwarf2.def (DW_AT_GNU_deleted): New attribute.
gcc/ChangeLog
* dwarf2out.c (gen_subprogram_die): When a member function is
explicitly deleted then add a DW_AT_GNU_deleted attribute.
* langhooks.h (struct lang_hooks_for_decls): Add
function_decl_deleted_p langhook.
* langhooks-def.h (LANG_HOOKS_FUNCTION_DECL_DELETED_P): Define.
(LANG_HOOKS_DECLS): Add LANG_HOOKS_FUNCTION_DECL_DELETED_P.
gcc/cp/ChangeLog
* cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_DELETED_P): Define.
(cp_function_decl_deleted_p): New prototype.
* cp-objcp-common.c (cp_function_deleted_p): New function.
gcc/testsuite/ChangeLog
* g++.dg/debug/dwarf2/deleted-member-function.C: New testcase.
From-SVN: r215901
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index a64038c..59c05ed 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -18306,6 +18306,12 @@ gen_subprogram_die (tree decl, dw_die_ref context_die) && (dwarf_version >= 3 || !dwarf_strict)) add_AT_flag (subr_die, DW_AT_explicit, 1); + /* If this is a C++11 deleted special function member then generate + a DW_AT_GNU_deleted attribute. */ + if (lang_hooks.decls.function_decl_deleted_p (decl) + && (! dwarf_strict)) + add_AT_flag (subr_die, DW_AT_GNU_deleted, 1); + /* The first time we see a member function, it is in the context of the class to which it belongs. We make sure of this by emitting the class first. The next time is the definition, which is |