public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] analyzer: tweaks to superedge::dump
@ 2020-03-27 14:14 David Malcolm
  0 siblings, 0 replies; only message in thread
From: David Malcolm @ 2020-03-27 14:14 UTC (permalink / raw)
  To: gcc-patches

Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to master as 4d661bb7a2e1fdfd856140f1b86266ca524df9e2.

gcc/analyzer/ChangeLog:
	* supergraph.cc (superedge::dump): Add space before description;
	move newline to non-pretty_printer overload.
---
 gcc/analyzer/supergraph.cc | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/gcc/analyzer/supergraph.cc b/gcc/analyzer/supergraph.cc
index e4c067606e0..4ed016e1898 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);
 }
 
-- 
2.21.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-03-27 14:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-27 14:14 [committed] analyzer: tweaks to superedge::dump David Malcolm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).