From bb42836b34dca74aab99035ac236fa6e81b1d4c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20L=C3=B3pez-Ib=C3=A1=C3=B1ez?= Date: Fri, 3 Oct 2014 21:22:10 +0000 Subject: tree-pretty-print.c (dump_location): Make it extern. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gcc/ChangeLog: 2014-10-03 Manuel López-Ibáñez * tree-pretty-print.c (dump_location): Make it extern. Dump also the column. * tree-pretty-print.h (dump_location): Declare. * gimple-pretty-print.c (dump_gimple_phi): Use dump_location. (pp_gimple_stmt_1): Likewise. (dump_implicit_edges): Likewise. * gimplify.c (gimplify_call_expr): Use LOCATION_FILE and LOCATION_LINE. gcc/testsuite/ChangeLog: 2014-10-03 Manuel López-Ibáñez * gcc.dg/tm/debug-1.c: Update regex. * c-c++-common/raw-string-18.c: Update regex. * c-c++-common/raw-string-19.c: Update regex. From-SVN: r215879 --- gcc/gimple-pretty-print.c | 48 ++++------------------------------------------- 1 file changed, 4 insertions(+), 44 deletions(-) (limited to 'gcc/gimple-pretty-print.c') diff --git a/gcc/gimple-pretty-print.c b/gcc/gimple-pretty-print.c index 60b56b0..4a42d27 100644 --- a/gcc/gimple-pretty-print.c +++ b/gcc/gimple-pretty-print.c @@ -1834,21 +1834,7 @@ dump_gimple_phi (pretty_printer *buffer, gimple phi, int spc, bool comment, for (i = 0; i < gimple_phi_num_args (phi); i++) { if ((flags & TDF_LINENO) && gimple_phi_arg_has_location (phi, i)) - { - expanded_location xloc; - - xloc = expand_location (gimple_phi_arg_location (phi, i)); - pp_left_bracket (buffer); - if (xloc.file) - { - pp_string (buffer, xloc.file); - pp_string (buffer, " : "); - } - pp_decimal_int (buffer, xloc.line); - pp_colon (buffer); - pp_decimal_int (buffer, xloc.column); - pp_string (buffer, "] "); - } + dump_location (buffer, gimple_phi_arg_location (phi, i)); dump_generic_node (buffer, gimple_phi_arg_def (phi, i), spc, flags, false); pp_left_paren (buffer); @@ -2076,19 +2062,7 @@ pp_gimple_stmt_1 (pretty_printer *buffer, gimple gs, int spc, int flags) pp_printf (buffer, "<&%p> ", (void *) gs); if ((flags & TDF_LINENO) && gimple_has_location (gs)) - { - expanded_location xloc = expand_location (gimple_location (gs)); - pp_left_bracket (buffer); - if (xloc.file) - { - pp_string (buffer, xloc.file); - pp_string (buffer, " : "); - } - pp_decimal_int (buffer, xloc.line); - pp_colon (buffer); - pp_decimal_int (buffer, xloc.column); - pp_string (buffer, "] "); - } + dump_location (buffer, gimple_location (gs)); if (flags & TDF_EH) { @@ -2404,22 +2378,8 @@ dump_implicit_edges (pretty_printer *buffer, basic_block bb, int indent, INDENT (indent); if ((flags & TDF_LINENO) - && e->goto_locus != UNKNOWN_LOCATION - ) - { - expanded_location goto_xloc; - goto_xloc = expand_location (e->goto_locus); - pp_left_bracket (buffer); - if (goto_xloc.file) - { - pp_string (buffer, goto_xloc.file); - pp_string (buffer, " : "); - } - pp_decimal_int (buffer, goto_xloc.line); - pp_string (buffer, " : "); - pp_decimal_int (buffer, goto_xloc.column); - pp_string (buffer, "] "); - } + && e->goto_locus != UNKNOWN_LOCATION) + dump_location (buffer, e->goto_locus); pp_cfg_jump (buffer, e->dest); pp_newline (buffer); -- cgit v1.1