summaryrefslogtreecommitdiff
path: root/gcc/langhooks.c
diff options
context:
space:
mode:
authorNicolas Setton <setton@adacore.com>2006-05-19 12:31:50 +0000
committerOlivier Hainque <hainque@gcc.gnu.org>2006-05-19 12:31:50 +0000
commit721a8ac58bbc00df746ccdfd6529f2d5424b11f3 (patch)
tree3e100b52fe6535b867760b19644619e5846e3062 /gcc/langhooks.c
parent6a1f86116204a1aaecbd1824cfd520ae248bb026 (diff)
downloadgcc-721a8ac58bbc00df746ccdfd6529f2d5424b11f3.tar.gz
langhooks.h (struct lang_hooks): Add dwarf_name language hook.
* langhooks.h (struct lang_hooks): Add dwarf_name language hook. * langhooks.c (lhd_dwarf_name): New function. * langhooks-def.h (lhd_dwarf_name): Declare. (LANG_HOOKS_DWARF_NAME): New macro, defaults to lhd_dwarf_name. * dwarf2out.c (dwarf2_name): Use the dwarf_name language hook. * ada/misc.c (gnat_dwarf_name): New function. (LANG_HOOKS_DWARF_NAME): Define to gnat_dwarf_name. From-SVN: r113905
Diffstat (limited to 'gcc/langhooks.c')
-rw-r--r--gcc/langhooks.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/langhooks.c b/gcc/langhooks.c
index b2b9b4595b2..4c736d054be 100644
--- a/gcc/langhooks.c
+++ b/gcc/langhooks.c
@@ -1,5 +1,5 @@
/* Default language-specific hooks.
- Copyright 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Contributed by Alexandre Oliva <aoliva@redhat.com>
This file is part of GCC.
@@ -264,6 +264,16 @@ lhd_decl_printable_name (tree decl, int ARG_UNUSED (verbosity))
return IDENTIFIER_POINTER (DECL_NAME (decl));
}
+/* This is the default dwarf_name function. */
+
+const char *
+lhd_dwarf_name (tree t, int verbosity)
+{
+ gcc_assert (DECL_P (t));
+
+ return lang_hooks.decl_printable_name (t, verbosity);
+}
+
/* This compares two types for equivalence ("compatible" in C-based languages).
This routine should only return 1 if it is sure. It should not be used
in contexts where erroneously returning 0 causes problems. */