Patchwork Fix CFG dumping of blocks with no predecessors or successors

login
register
mail settings
Submitter Steven Bosscher
Date Aug. 29, 2012, 8:39 p.m.
Message ID <CABu31nP_bCEXupEPN390BjQzWV+yyYXWGue9M0ZZ70hmRY=zKw@mail.gmail.com>
Download mbox | patch
Permalink /patch/180765/
State New
Headers show

Comments

Steven Bosscher - Aug. 29, 2012, 8:39 p.m.
Will commit as obvious.

* cfg.c (dump_bb_info): Print a newline if there were no edges to dump.

Patch

Index: cfg.c
===================================================================
--- cfg.c       (revision 190785)
+++ cfg.c       (working copy)
@@ -764,6 +764,8 @@  dump_bb_info (FILE *outf, basic_block bb, int inde
          dump_edge_info (outf, e, flags, 0);
          fputc ('\n', outf);
        }
+      if (first)
+       fputc ('\n', outf);
     }

   if (do_footer)
@@ -784,6 +786,8 @@ 
          dump_edge_info (outf, e, flags, 1);
          fputc ('\n', outf);
        }
+      if (first)
+       fputc ('\n', outf);
     }
 }