From d817c4ec6d458777537aae3a04201b7182a5f78a Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Fri, 9 Sep 2016 11:29:33 -0700 Subject: [PATCH] cmd/compile: use regular rather than indexed format string This enables the format test to process this file (the format test doesn't handle indexed formats, and this is the only place in the compiler where they occur). Change-Id: I99743f20c463f181a589b210365f70162227d4e0 Reviewed-on: https://go-review.googlesource.com/28932 Run-TryBot: Robert Griesemer Reviewed-by: Keith Randall --- src/cmd/compile/internal/ssa/html.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/cmd/compile/internal/ssa/html.go b/src/cmd/compile/internal/ssa/html.go index f60887a3e1..18c3e232e0 100644 --- a/src/cmd/compile/internal/ssa/html.go +++ b/src/cmd/compile/internal/ssa/html.go @@ -341,7 +341,8 @@ func (v *Value) HTML() string { // TODO: Using the value ID as the class ignores the fact // that value IDs get recycled and that some values // are transmuted into other values. - return fmt.Sprintf("%[1]s", v.String()) + s := v.String() + return fmt.Sprintf("%s", s, s) } func (v *Value) LongHTML() string { @@ -369,7 +370,8 @@ func (b *Block) HTML() string { // TODO: Using the value ID as the class ignores the fact // that value IDs get recycled and that some values // are transmuted into other values. - return fmt.Sprintf("%[1]s", html.EscapeString(b.String())) + s := html.EscapeString(b.String()) + return fmt.Sprintf("%s", s, s) } func (b *Block) LongHTML() string { -- 2.48.1