summaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2009-03-27 21:44:21 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2009-03-27 21:44:21 +0000
commitcb3582e73cdcb0d283d873e62bb1d1223085f687 (patch)
treece9a63a4cd6c9024f69411c47ca98e056f2dc06a /gcc/dwarf2out.c
parent3f95c6909beb5ba36887def50f7d0421f02196b0 (diff)
downloadgcc-cb3582e73cdcb0d283d873e62bb1d1223085f687.tar.gz
PR debug/37959
* dwarf2out.c (dwarf_attr_name): Handle DW_AT_explicit attribute. (gen_subprogram_die): When a function is explicit, generate the DW_AT_explicit attribute. * langhooks.h (struct lang_hooks_for_decls): Add function_decl_explicit_p langhook. * langhooks-def.h (LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P): Define. (LANG_HOOKS_DECLS): Add LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P. * cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P): Define. (cp_function_decl_explicit_p): New prototype. * cp-objcp-common.c (cp_function_decl_explicit_p): New function. * g++.dg/debug/dwarf2/explicit-constructor.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@145128 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 9bf0803ce57..1c82f9c09ff 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -5599,6 +5599,8 @@ dwarf_attr_name (unsigned int attr)
return "DW_AT_encoding";
case DW_AT_external:
return "DW_AT_external";
+ case DW_AT_explicit:
+ return "DW_AT_explicit";
case DW_AT_frame_base:
return "DW_AT_frame_base";
case DW_AT_friend:
@@ -13611,6 +13613,11 @@ gen_subprogram_die (tree decl, dw_die_ref context_die)
{
add_AT_flag (subr_die, DW_AT_declaration, 1);
+ /* If this is an explicit function declaration then generate
+ a DW_AT_explicit attribute. */
+ if (lang_hooks.decls.function_decl_explicit_p (decl))
+ add_AT_flag (subr_die, DW_AT_explicit, 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