aboutsummaryrefslogtreecommitdiff
path: root/gcc/graph.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/graph.c')
-rw-r--r--gcc/graph.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/gcc/graph.c b/gcc/graph.c
index d82dd917ce9..483cc7e35a1 100644
--- a/gcc/graph.c
+++ b/gcc/graph.c
@@ -25,9 +25,11 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "tm.h"
#include "rtl.h"
+#include "tree.h"
#include "flags.h"
#include "output.h"
#include "function.h"
+#include "langhooks.h"
#include "hard-reg-set.h"
#include "basic-block.h"
#include "toplev.h"
@@ -55,7 +57,8 @@ start_fct (FILE *fp)
case vcg:
fprintf (fp, "\
graph: { title: \"%s\"\nfolding: 1\nhidden: 2\nnode: { title: \"%s.0\" }\n",
- current_function_name, current_function_name);
+ (*lang_hooks.decl_printable_name) (current_function_decl, 2),
+ (*lang_hooks.decl_printable_name) (current_function_decl, 2));
break;
case no_graph:
break;
@@ -71,7 +74,8 @@ start_bb (FILE *fp, int bb)
fprintf (fp, "\
graph: {\ntitle: \"%s.BB%d\"\nfolding: 1\ncolor: lightblue\n\
label: \"basic block %d",
- current_function_name, bb, bb);
+ (*lang_hooks.decl_printable_name) (current_function_decl, 2),
+ bb, bb);
break;
case no_graph:
break;
@@ -113,8 +117,9 @@ node_data (FILE *fp, rtx tmp_rtx)
case vcg:
fprintf (fp, "\
edge: { sourcename: \"%s.0\" targetname: \"%s.%d\" }\n",
- current_function_name,
- current_function_name, XINT (tmp_rtx, 0));
+ (*lang_hooks.decl_printable_name) (current_function_decl, 2),
+ (*lang_hooks.decl_printable_name) (current_function_decl, 2),
+ XINT (tmp_rtx, 0));
break;
case no_graph:
break;
@@ -126,7 +131,8 @@ edge: { sourcename: \"%s.0\" targetname: \"%s.%d\" }\n",
case vcg:
fprintf (fp, "node: {\n title: \"%s.%d\"\n color: %s\n \
label: \"%s %d\n",
- current_function_name, XINT (tmp_rtx, 0),
+ (*lang_hooks.decl_printable_name) (current_function_decl, 2),
+ XINT (tmp_rtx, 0),
GET_CODE (tmp_rtx) == NOTE ? "lightgrey"
: GET_CODE (tmp_rtx) == INSN ? "green"
: GET_CODE (tmp_rtx) == JUMP_INSN ? "darkgreen"
@@ -178,8 +184,11 @@ draw_edge (FILE *fp, int from, int to, int bb_edge, int class)
color = "color: green ";
fprintf (fp,
"edge: { sourcename: \"%s.%d\" targetname: \"%s.%d\" %s",
- current_function_name, from,
- current_function_name, to, color);
+ (*lang_hooks.decl_printable_name) (current_function_decl, 2),
+ from,
+ (*lang_hooks.decl_printable_name) (current_function_decl, 2),
+ to,
+ color);
if (class)
fprintf (fp, "class: %d ", class);
fputs ("}\n", fp);
@@ -209,7 +218,7 @@ end_fct (FILE *fp)
{
case vcg:
fprintf (fp, "node: { title: \"%s.999999\" label: \"END\" }\n}\n",
- current_function_name);
+ (*lang_hooks.decl_printable_name) (current_function_decl, 2));
break;
case no_graph:
break;