diff options
author | mark <mark@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-10-05 15:25:03 +0000 |
---|---|---|
committer | mark <mark@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-10-05 15:25:03 +0000 |
commit | 77cab4753e1206a8a5246f9989b7427990ca0e06 (patch) | |
tree | 700ed4a22c54f19e861b8af7cede31a1ed585658 /gcc/cp/cp-objcp-common.c | |
parent | 43aac8cbef62d213585c7ade8768e3443e75eb21 (diff) | |
download | linaro-gcc-77cab4753e1206a8a5246f9989b7427990ca0e06.tar.gz linaro-gcc-77cab4753e1206a8a5246f9989b7427990ca0e06.tar.bz2 linaro-gcc-77cab4753e1206a8a5246f9989b7427990ca0e06.zip |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@215901 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 0c50f4085ab..0d144ef0ba7 100644 --- a/gcc/cp/cp-objcp-common.c +++ b/gcc/cp/cp-objcp-common.c @@ -168,6 +168,16 @@ cp_function_decl_explicit_p (tree decl) && DECL_NONCONVERTING_P (decl)); } +/* Return true if DECL is deleted special member function. */ + +bool +cp_function_decl_deleted_p (tree decl) +{ + return (decl + && DECL_LANG_SPECIFIC (STRIP_TEMPLATE (decl)) + && DECL_DELETED_FN (decl)); +} + /* Stubs to keep c-opts.c happy. */ void push_file_scope (void) |