diff options
author | Nick Clifton <nickc@redhat.com> | 2009-09-29 09:31:41 +0000 |
---|---|---|
committer | Nick Clifton <nickc@gcc.gnu.org> | 2009-09-29 09:31:41 +0000 |
commit | c7ac4fb53d99bc86133fec643cf010685623382c (patch) | |
tree | bc4fa064e12466b9725d62e127217f187ce488d2 /gcc | |
parent | 9abe5e56e20294d899363abc8898d4fa6a72e2f7 (diff) | |
download | gcc-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')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/function.c | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9826735..7ab49af 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2009-09-29 Nick Clifton <nickc@redhat.com> + + * function.c (current_function_name): If there is no current + function just return "<none>". + 2009-09-28 Sriraman Tallam <tmsriram@google.com> * tree-pass.h (register_pass_info): New structure. 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); } |