aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-pretty-print.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2004-06-09 10:00:30 -0700
committerRichard Henderson <rth@gcc.gnu.org>2004-06-09 10:00:30 -0700
commit62b857eabfaedc1e5f9c824d0d508ac4a6005d9b (patch)
tree3bd1558b7817ffa9d7cbc42664788157968cb92b /gcc/tree-pretty-print.c
parent93a9f7d6c63e39974dd0f77ba42af58f71671ad3 (diff)
downloadgcc-62b857eabfaedc1e5f9c824d0d508ac4a6005d9b.zip
gcc-62b857eabfaedc1e5f9c824d0d508ac4a6005d9b.tar.gz
gcc-62b857eabfaedc1e5f9c824d0d508ac4a6005d9b.tar.bz2
basic-block.h (struct edge_def): Add goto_locus.
* basic-block.h (struct edge_def): Add goto_locus. * tree-cfg.c (make_goto_expr_edges): Set it. (disband_implicit_edges): Use it. * tree-pretty-print.c (dump_implicit_edges): Print it. From-SVN: r82842
Diffstat (limited to 'gcc/tree-pretty-print.c')
-rw-r--r--gcc/tree-pretty-print.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c
index ef130d8..d5566b8 100644
--- a/gcc/tree-pretty-print.c
+++ b/gcc/tree-pretty-print.c
@@ -2227,7 +2227,8 @@ pp_cfg_jump (pretty_printer *buffer, basic_block bb)
by INDENT spaces, with details given by FLAGS. */
static void
-dump_implicit_edges (pretty_printer *buffer, basic_block bb, int indent)
+dump_implicit_edges (pretty_printer *buffer, basic_block bb, int indent,
+ int flags)
{
edge e;
@@ -2239,6 +2240,19 @@ dump_implicit_edges (pretty_printer *buffer, basic_block bb, int indent)
if (e && e->dest != bb->next_bb)
{
INDENT (indent);
+
+ if ((flags & TDF_LINENO) && e->goto_locus)
+ {
+ pp_character (buffer, '[');
+ if (e->goto_locus->file)
+ {
+ pp_string (buffer, e->goto_locus->file);
+ pp_string (buffer, " : ");
+ }
+ pp_decimal_int (buffer, e->goto_locus->line);
+ pp_string (buffer, "] ");
+ }
+
pp_cfg_jump (buffer, e->dest);
pp_newline (buffer);
}
@@ -2276,7 +2290,7 @@ dump_generic_bb_buff (pretty_printer *buffer, basic_block bb,
pp_newline (buffer);
}
- dump_implicit_edges (buffer, bb, indent);
+ dump_implicit_edges (buffer, bb, indent, flags);
if (flags & TDF_BLOCKS)
dump_bb_end (buffer, bb, indent, flags);