aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2020-03-19 10:13:25 -0400
committerDavid Malcolm <dmalcolm@redhat.com>2020-03-27 09:58:41 -0400
commit4d661bb7a2e1fdfd856140f1b86266ca524df9e2 (patch)
tree855defbe189a02e8de2f7e5f728aa17c2acbd03f
parent45cfaf9903d3f5aa916d330f2013eb7d820a7137 (diff)
downloadgcc-4d661bb7a2e1fdfd856140f1b86266ca524df9e2.zip
gcc-4d661bb7a2e1fdfd856140f1b86266ca524df9e2.tar.gz
gcc-4d661bb7a2e1fdfd856140f1b86266ca524df9e2.tar.bz2
analyzer: tweaks to superedge::dump
gcc/analyzer/ChangeLog: * supergraph.cc (superedge::dump): Add space before description; move newline to non-pretty_printer overload.
-rw-r--r--gcc/analyzer/ChangeLog5
-rw-r--r--gcc/analyzer/supergraph.cc10
2 files changed, 13 insertions, 2 deletions
diff --git a/gcc/analyzer/ChangeLog b/gcc/analyzer/ChangeLog
index 0219cb3..fd3d4e0 100644
--- a/gcc/analyzer/ChangeLog
+++ b/gcc/analyzer/ChangeLog
@@ -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".
diff --git a/gcc/analyzer/supergraph.cc b/gcc/analyzer/supergraph.cc
index e4c0676..4ed016e 100644
--- a/gcc/analyzer/supergraph.cc
+++ b/gcc/analyzer/supergraph.cc
@@ -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);
}