diff options
Diffstat (limited to 'gcc-4.4.0/gcc/gimple-pretty-print.c')
-rw-r--r-- | gcc-4.4.0/gcc/gimple-pretty-print.c | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/gcc-4.4.0/gcc/gimple-pretty-print.c b/gcc-4.4.0/gcc/gimple-pretty-print.c index 033cd41e7..5c54d35f9 100644 --- a/gcc-4.4.0/gcc/gimple-pretty-print.c +++ b/gcc-4.4.0/gcc/gimple-pretty-print.c @@ -1177,6 +1177,22 @@ dump_gimple_phi (pretty_printer *buffer, gimple phi, int spc, int flags) } 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_character (buffer, '['); + if (xloc.file) + { + pp_string (buffer, xloc.file); + pp_string (buffer, " : "); + } + pp_decimal_int (buffer, xloc.line); + pp_string (buffer, ":"); + pp_decimal_int (buffer, xloc.column); + pp_string (buffer, "] "); + } dump_generic_node (buffer, gimple_phi_arg_def (phi, i), spc, flags, false); pp_character (buffer, '('); @@ -1473,7 +1489,9 @@ dump_gimple_stmt (pretty_printer *buffer, gimple gs, int spc, int flags) if ((flags & TDF_LINENO) && gimple_has_location (gs)) { - expanded_location xloc = expand_location (gimple_location (gs)); + location_t loc = gimple_location (gs); + expanded_location xloc = expand_location (loc); + int discriminator = get_discriminator_from_locus (loc); pp_character (buffer, '['); if (xloc.file) { @@ -1481,6 +1499,11 @@ dump_gimple_stmt (pretty_printer *buffer, gimple gs, int spc, int flags) pp_string (buffer, " : "); } pp_decimal_int (buffer, xloc.line); + if (discriminator) + { + pp_string (buffer, " discrim "); + pp_decimal_int (buffer, discriminator); + } pp_string (buffer, "] "); } @@ -1664,12 +1687,6 @@ dump_bb_header (pretty_printer *buffer, basic_block bb, int indent, int flags) pp_decimal_int (buffer, get_lineno (gsi_stmt (gsi))); break; } - - if (bb->discriminator) - { - pp_string (buffer, ", discriminator "); - pp_decimal_int (buffer, bb->discriminator); - } } newline_and_indent (buffer, indent); |