From 3fb7c69995f85f8efde91a03a26acf49d35351f8 Mon Sep 17 00:00:00 2001 From: Steven Bosscher Date: Fri, 15 Feb 2013 09:30:52 +0000 Subject: graph.c (start_graph_dump): Print dumpfile base as digraph label. * graph.c (start_graph_dump): Print dumpfile base as digraph label. (clean_graph_dump_file): Pass base to start_graph_dump. From-SVN: r196074 --- gcc/graph.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'gcc/graph.c') diff --git a/gcc/graph.c b/gcc/graph.c index 52b51d8db09..51837308bb4 100644 --- a/gcc/graph.c +++ b/gcc/graph.c @@ -308,11 +308,16 @@ print_graph_cfg (const char *base, struct function *fun) /* Start the dump of a graph. */ static void -start_graph_dump (FILE *fp) +start_graph_dump (FILE *fp, const char *base) { - fputs ("digraph \"\" {\n" - "overlap=false;\n", - fp); + pretty_printer *pp = init_graph_slim_pretty_print (fp); + pp_string (pp, "digraph \""); + pp_write_text_to_stream (pp); + pp_string (pp, base); + pp_write_text_as_dot_label_to_stream (pp, /*for_record=*/false); + pp_string (pp, "\" {\n"); + pp_string (pp, "overlap=false;\n"); + pp_flush (pp); } /* End the dump of a graph. */ @@ -327,7 +332,7 @@ void clean_graph_dump_file (const char *base) { FILE *fp = open_graph_file (base, "w"); - start_graph_dump (fp); + start_graph_dump (fp, base); fclose (fp); } -- cgit v1.2.1