Mercurial > hg > CbC > CbC_gcc
diff gcc/graph.c @ 67:f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
author | nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 22 Mar 2011 17:18:12 +0900 |
parents | a06113de4d67 |
children | 04ced10e8804 |
line wrap: on
line diff
--- a/gcc/graph.c Tue May 25 18:58:51 2010 +0900 +++ b/gcc/graph.c Tue Mar 22 17:18:12 2011 +0900 @@ -1,5 +1,5 @@ /* Output routines for graphical representation. - Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2007, 2008 + Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2007, 2008, 2010 Free Software Foundation, Inc. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. @@ -19,7 +19,7 @@ along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>. */ -#include <config.h> +#include "config.h" #include "system.h" #include "coretypes.h" #include "tm.h" @@ -30,8 +30,9 @@ #include "hard-reg-set.h" #include "obstack.h" #include "basic-block.h" -#include "toplev.h" +#include "diagnostic-core.h" #include "graph.h" +#include "emit-rtl.h" static const char *const graph_ext[] = { @@ -39,6 +40,9 @@ /* vcg */ ".vcg", }; +/* The flag to indicate if output is inside of a building block. */ +static int inbb = 0; + static void start_fct (FILE *); static void start_bb (FILE *, int); static void node_data (FILE *, rtx); @@ -76,6 +80,7 @@ graph: {\ntitle: \"%s.BB%d\"\nfolding: 1\ncolor: lightblue\n\ label: \"basic block %d", current_function_name (), bb, bb); + inbb = 1; /* Now We are inside of a building block. */ break; case no_graph: break; @@ -197,7 +202,12 @@ switch (graph_dump_format) { case vcg: - fputs ("}\n", fp); + /* Check if we are inside of a building block. */ + if (inbb != 0) + { + fputs ("}\n", fp); + inbb = 0; /* Now we are outside of a building block. */ + } break; case no_graph: break; @@ -398,7 +408,7 @@ fp = fopen (buf, "w"); if (fp == NULL) - fatal_error ("can't open %s: %m", buf); + fatal_error ("can%'t open %s: %m", buf); gcc_assert (graph_dump_format == vcg); fputs ("graph: {\nport_sharing: no\n", fp);