summaryrefslogtreecommitdiff
path: root/gcc/graph.c
diff options
context:
space:
mode:
authorxmj <xmj@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-14 01:48:43 +0000
committerxmj <xmj@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-14 01:48:43 +0000
commitd0c03912c200fb04621f4d6e820204acdbb4ba7f (patch)
tree97f9716d448746cd346b863b7d15e21f5e73a187 /gcc/graph.c
parent634488866ed61164231d04c182ab48a296d6da81 (diff)
downloadgcc-d0c03912c200fb04621f4d6e820204acdbb4ba7f.tar.gz
F^C the vcg dump bug.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165444 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/graph.c')
-rw-r--r--gcc/graph.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/graph.c b/gcc/graph.c
index 081dec852c5..7c2a5700f69 100644
--- a/gcc/graph.c
+++ b/gcc/graph.c
@@ -40,6 +40,9 @@ static const char *const graph_ext[] =
/* 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);
@@ -77,6 +80,7 @@ start_bb (FILE *fp, int bb)
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;
@@ -198,7 +202,12 @@ end_bb (FILE *fp)
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;