diff options
author | steven <steven@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-02-15 09:30:52 +0000 |
---|---|---|
committer | steven <steven@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-02-15 09:30:52 +0000 |
commit | 69df75368c19c6a02b86adda922d394e6e698363 (patch) | |
tree | f5bb20945f65bf69e0954f32e260f2cbcf4d231a /gcc/graph.c | |
parent | dbbb84de18105e0e32f41ccde7d4c14fb3f7dbda (diff) | |
download | gcc-69df75368c19c6a02b86adda922d394e6e698363.tar.gz |
* graph.c (start_graph_dump): Print dumpfile base as digraph label.
(clean_graph_dump_file): Pass base to start_graph_dump.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@196074 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/graph.c')
-rw-r--r-- | gcc/graph.c | 15 |
1 files changed, 10 insertions, 5 deletions
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); } |