aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2009-09-29 09:31:41 +0000
committerNick Clifton <nickc@gcc.gnu.org>2009-09-29 09:31:41 +0000
commitc7ac4fb53d99bc86133fec643cf010685623382c (patch)
treebc4fa064e12466b9725d62e127217f187ce488d2 /gcc/function.c
parent9abe5e56e20294d899363abc8898d4fa6a72e2f7 (diff)
downloadgcc-c7ac4fb53d99bc86133fec643cf010685623382c.zip
gcc-c7ac4fb53d99bc86133fec643cf010685623382c.tar.gz
gcc-c7ac4fb53d99bc86133fec643cf010685623382c.tar.bz2
function.c (current_function_name): If there is no current function just return "<none>".
* function.c (current_function_name): If there is no current function just return "<none>". From-SVN: r152269
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/function.c b/gcc/function.c
index aaed57a..35c0cfd 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -5415,6 +5415,8 @@ reposition_prologue_and_epilogue_notes (void)
const char *
current_function_name (void)
{
+ if (cfun == NULL)
+ return "<none>";
return lang_hooks.decl_printable_name (cfun->decl, 2);
}