aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/cp-objcp-common.c
diff options
context:
space:
mode:
authorDodji Seketeli <dodji@redhat.com>2009-03-27 21:44:21 +0000
committerJakub Jelinek <jakub@gcc.gnu.org>2009-03-27 22:44:21 +0100
commit68599f330b29e9f1b0fd5bb1578741a5e663688d (patch)
treece9a63a4cd6c9024f69411c47ca98e056f2dc06a /gcc/cp/cp-objcp-common.c
parent64d7685c6fa0dfda3d5be0964f8de832fe0671c4 (diff)
downloadgcc-68599f330b29e9f1b0fd5bb1578741a5e663688d.zip
gcc-68599f330b29e9f1b0fd5bb1578741a5e663688d.tar.gz
gcc-68599f330b29e9f1b0fd5bb1578741a5e663688d.tar.bz2
re PR debug/37959 (g++ does not emit DW_AT_explicit)
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. Co-Authored-By: Jakub Jelinek <jakub@redhat.com> From-SVN: r145128
Diffstat (limited to 'gcc/cp/cp-objcp-common.c')
-rw-r--r--gcc/cp/cp-objcp-common.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/cp/cp-objcp-common.c b/gcc/cp/cp-objcp-common.c
index fefafb1..daefa2b 100644
--- a/gcc/cp/cp-objcp-common.c
+++ b/gcc/cp/cp-objcp-common.c
@@ -1,5 +1,5 @@
/* Some code common to C++ and ObjC++ front ends.
- Copyright (C) 2004, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2007, 2008, 2009 Free Software Foundation, Inc.
Contributed by Ziemowit Laski <zlaski@apple.com>
This file is part of GCC.
@@ -203,6 +203,16 @@ cxx_staticp (tree arg)
return NULL_TREE;
}
+/* Return true if DECL is explicit member function. */
+
+bool
+cp_function_decl_explicit_p (tree decl)
+{
+ return (decl
+ && FUNCTION_FIRST_USER_PARMTYPE (decl) != void_list_node
+ && DECL_NONCONVERTING_P (decl));
+}
+
/* Stubs to keep c-opts.c happy. */
void
push_file_scope (void)