summaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2012-09-17 05:30:37 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2012-09-17 05:30:37 +0000
commit51d619308377f16a8ff13df95becfe2282198844 (patch)
tree21b147aea83b41c5c37fba84ea32c18f1c7de253 /gcc/function.c
parent9b39d7e80300d4a7fc3399d0896881027479b72a (diff)
downloadgcc-51d619308377f16a8ff13df95becfe2282198844.tar.gz
2012-09-17 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 191371 using svnmerge. [gcc/] 2012-09-17 Basile Starynkevitch <basile@starynkevitch.net> {{when merging trunk svn rev 191371}} * melt-runtime.c (melt_load_module_index): Push an empty slot, not a null pointer, into melt_modinfvec. (meltgc_run_c_extension): Push an empty slot, not a null pointer, into melt_extinfvec. (melt_really_initialize): Better indentation, and increase maximal minore size to 32768Kwords. Push an empty slot, not a null pointer, into melt_modinfvec. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@191373 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/gcc/function.c b/gcc/function.c
index f1e0b2d3eba..72056a6eecc 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -6753,13 +6753,21 @@ reposition_prologue_and_epilogue_notes (void)
#endif /* HAVE_prologue or HAVE_epilogue */
}
+/* Returns the name of function declared by FNDECL. */
+const char *
+fndecl_name (tree fndecl)
+{
+ if (fndecl == NULL)
+ return "(nofn)";
+ return lang_hooks.decl_printable_name (fndecl, 2);
+}
+
/* Returns the name of function FN. */
const char *
function_name (struct function *fn)
{
- if (fn == NULL)
- return "(nofn)";
- return lang_hooks.decl_printable_name (fn->decl, 2);
+ tree fndecl = (fn == NULL) ? NULL : fn->decl;
+ return fndecl_name (fndecl);
}
/* Returns the name of the current function. */