diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2016-08-12 07:11:50 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2016-08-12 07:11:50 +0000 |
commit | e366d7d807f8d06dc35570871ba2b723b78975af (patch) | |
tree | 471d9088fd063b9813bc17c068db09d41e6775d3 /gcc/langhooks-def.h | |
parent | 71e1a6a4c799e27be77f593c82b1575e094ea548 (diff) | |
download | gcc-e366d7d807f8d06dc35570871ba2b723b78975af.zip gcc-e366d7d807f8d06dc35570871ba2b723b78975af.tar.gz gcc-e366d7d807f8d06dc35570871ba2b723b78975af.tar.bz2 |
[PR63240] generate debug info for defaulted member functions
This implements <http://dwarfstd.org/ShowIssue.php?issue=141215.3>, a
proposal already accepted for inclusion in DWARF-5, but using
DW_AT_GNU_defaulted instead of DW_AT_defaulted as the attribute name,
because the attribute id for DW_AT_defaulted is not yet publicly
available.
for include/ChangeLog
PR debug/63240
* dwarf2.def (DW_AT_deleted, DW_AT_defaulted): New.
* dwarf2.h (enu dwarf_defaulted_attribute): New.
for gcc/ChangeLog
PR debug/63240
* langhooks-def.h
(LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P): Const_tree-ify.
(LANG_HOOKS_FUNCTION_DECL_DELETED_P): Likewise.
(LANG_HOOKS_FUNCTION_DECL_DEFAULTED): Set default.
(LANG_HOOKS_DECLS): Add it.
* langhooks.h (struct lang_hooks_for_decls): Add
function_decl_defaulted. Const_tree-ify
function_decl_explicit_p and function_decl_deleted_p.
* dwarf2out.c (gen_subprogram_die): Add DW_AT_defaulted
attribute. Add DW_AT_deleted instead of DW_AT_GNU_deleted,
also at strict DWARF v5.
for gcc/cp/ChangeLog
PR debug/63240
* cp-objcp-common.c (cp_function_decl_defaulted): New.
(cp_function_decl_explicit_p): Const_tree-ify.
(cp_function_decl_deleted_p): Likewise.
* cp-objcp-common.h (cp_function_decl_defaulted): Declare.
(cp_function_decl_explicit_p): Const_tree-ify.
(cp_function_decl_deleted_p): Likewise.
(LANG_HOOKS_FUNCTION_DECL_DEFAULTED): Redefine.
for gcc/testsuite/ChangeLog
PR debug/63240
* g++.dg/debug/dwarf2/defaulted-member-function-1.C: New.
* g++.dg/debug/dwarf2/defaulted-member-function-2.C: New.
* g++.dg/debug/dwarf2/defaulted-member-function-3.C: New.
* g++.dg/debug/dwarf2/deleted-member-function.C: Expect
DW_AT_deleted.
From-SVN: r239403
Diffstat (limited to 'gcc/langhooks-def.h')
-rw-r--r-- | gcc/langhooks-def.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/langhooks-def.h b/gcc/langhooks-def.h index c17f998..10d910c 100644 --- a/gcc/langhooks-def.h +++ b/gcc/langhooks-def.h @@ -209,8 +209,9 @@ extern tree lhd_make_node (enum tree_code); #define LANG_HOOKS_GLOBAL_BINDINGS_P global_bindings_p #define LANG_HOOKS_PUSHDECL pushdecl #define LANG_HOOKS_GETDECLS getdecls -#define LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P hook_bool_tree_false -#define LANG_HOOKS_FUNCTION_DECL_DELETED_P hook_bool_tree_false +#define LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P hook_bool_const_tree_false +#define LANG_HOOKS_FUNCTION_DECL_DELETED_P hook_bool_const_tree_false +#define LANG_HOOKS_FUNCTION_DECL_DEFAULTED hook_int_const_tree_0 #define LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL lhd_warn_unused_global_decl #define LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS NULL #define LANG_HOOKS_DECL_OK_FOR_SIBCALL lhd_decl_ok_for_sibcall @@ -233,6 +234,7 @@ extern tree lhd_make_node (enum tree_code); LANG_HOOKS_GETDECLS, \ LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P, \ LANG_HOOKS_FUNCTION_DECL_DELETED_P, \ + LANG_HOOKS_FUNCTION_DECL_DEFAULTED, \ LANG_HOOKS_GENERIC_GENERIC_PARAMETER_DECL_P, \ LANG_HOOKS_FUNCTION_PARM_EXPANDED_FROM_PACK_P, \ LANG_HOOKS_GET_GENERIC_FUNCTION_DECL, \ |