]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/function.c
gcc/
[thirdparty/gcc.git] / gcc / function.c
index 518d52401c5ade0bf7893978723960d49410164a..b37646922a457cdaf5a6e5523529d7c27510eec5 100644 (file)
@@ -6738,13 +6738,20 @@ reposition_prologue_and_epilogue_notes (void)
 #endif /* HAVE_prologue or HAVE_epilogue */
 }
 
+/* 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);
+}
+
 /* Returns the name of the current function.  */
 const char *
 current_function_name (void)
 {
-  if (cfun == NULL)
-    return "<none>";
-  return lang_hooks.decl_printable_name (cfun->decl, 2);
+  return function_name (cfun);
 }
 \f