]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.regabi] cmd/compile: add newline to ir.Dump
authorKeith Randall <khr@golang.org>
Tue, 29 Dec 2020 18:08:30 +0000 (10:08 -0800)
committerKeith Randall <khr@golang.org>
Wed, 30 Dec 2020 16:37:09 +0000 (16:37 +0000)
If you do two ir.Dumps in a row, there's no newline between them.

Change-Id: I1a80dd22da68cb677eb9abd7a50571ea33584010
Reviewed-on: https://go-review.googlesource.com/c/go/+/280672
Trust: Keith Randall <khr@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/ir/fmt.go

index ea6b5856df6d5b071241974e4ccad11fe9b9de22..6209702291bd5bad86465061faa734e4293a2ba1 100644 (file)
@@ -978,7 +978,7 @@ func (l Nodes) Format(s fmt.State, verb rune) {
 
 // Dump prints the message s followed by a debug dump of n.
 func Dump(s string, n Node) {
-       fmt.Printf("%s [%p]%+v", s, n, n)
+       fmt.Printf("%s [%p]%+v\n", s, n, n)
 }
 
 // DumpList prints the message s followed by a debug dump of each node in the list.