analyzer: tweaks to superedge::dump

gcc/analyzer/ChangeLog:
	* supergraph.cc (superedge::dump): Add space before description;
	move newline to non-pretty_printer overload.
This commit is contained in:
David Malcolm 2020-03-19 10:13:25 -04:00
parent 45cfaf9903
commit 4d661bb7a2
2 changed files with 13 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2020-03-27 David Malcolm <dmalcolm@redhat.com>
* supergraph.cc (superedge::dump): Add space before description;
move newline to non-pretty_printer overload.
2020-03-18 David Malcolm <dmalcolm@redhat.com>
* region-model.cc: Include "stor-layout.h".

View File

@ -630,8 +630,13 @@ void
superedge::dump (pretty_printer *pp) const
{
pp_printf (pp, "edge: SN: %i -> SN: %i", m_src->m_index, m_dest->m_index);
dump_label_to_pp (pp, false);
pp_newline (pp);
char *desc = get_description (false);
if (strlen (desc) > 0)
{
pp_space (pp);
pp_string (pp, desc);
}
free (desc);
}
/* Dump this superedge to stderr. */
@ -644,6 +649,7 @@ superedge::dump () const
pp_show_color (&pp) = pp_show_color (global_dc->printer);
pp.buffer->stream = stderr;
dump (&pp);
pp_newline (&pp);
pp_flush (&pp);
}