Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c9b4dca

Browse files
Yury Smolskydr2chase
Yury Smolsky
authored andcommitted
cmd/compile: fix TestFormats by using valid formats
CL 142517 has used some formats incorrectly. This change fixes it by using %v for errors and invoking Block.Kind.String(). Format map stays intact. Updates #28177 Change-Id: If53b6cc54ba3c1ffc17b005225787e3b546de404 Reviewed-on: https://go-review.googlesource.com/c/150798 Run-TryBot: Yury Smolsky <yury@smolsky.by> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
1 parent 2a7f904 commit c9b4dca

File tree

1 file changed

+3
-3
lines changed
  • src/cmd/compile/internal/ssa

1 file changed

+3
-3
lines changed

‎src/cmd/compile/internal/ssa/html.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,7 @@ func (d *dotWriter) writeFuncSVG(w io.Writer, phase string, f *Func) {
893893
if f.laidout {
894894
layout = fmt.Sprintf(" #%d", i)
895895
}
896-
fmt.Fprintf(pipe, `%v [label="%v%s\n%v",id="graph_node_%v_%v",tooltip="%v"];`, b, b, layout, b.Kind, id, b, b.LongString())
896+
fmt.Fprintf(pipe, `%v [label="%v%s\n%v",id="graph_node_%v_%v",tooltip="%v"];`, b, b, layout, b.Kind.String(), id, b, b.LongString())
897897
}
898898
indexOf := make([]int, f.NumBlocks())
899899
for i, b := range f.Blocks {
@@ -942,7 +942,7 @@ func (d *dotWriter) writeFuncSVG(w io.Writer, phase string, f *Func) {
942942
err = cmd.Wait()
943943
if err != nil {
944944
d.broken = true
945-
fmt.Printf("dot: %s\n%v\n", err, bufErr.String())
945+
fmt.Printf("dot: %v\n%v\n", err, bufErr.String())
946946
return
947947
}
948948

@@ -952,7 +952,7 @@ func (d *dotWriter) writeFuncSVG(w io.Writer, phase string, f *Func) {
952952
// our fingers, finding '<svg ' and injecting needed attributes after it.
953953
err = d.copyUntil(w, buf, `<svg `)
954954
if err != nil {
955-
fmt.Printf("injecting attributes: %s\n", err)
955+
fmt.Printf("injecting attributes: %v\n", err)
956956
return
957957
}
958958
fmt.Fprintf(w, ` id="%s" onload="makeDraggable(evt)" `, svgID)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /