Commit 2e2db7a1 authored by Keith Randall's avatar Keith Randall

cmd/compile: fix format verbs in ssa package

%s is no longer valid.  Use %v instead.

Change-Id: I5ec4fa6a9280082c1a0c75fd1cf94b4bb8096f5c
Reviewed-on: https://go-review.googlesource.com/29365Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 246074d0
...@@ -33,9 +33,9 @@ type LocalSlot struct { ...@@ -33,9 +33,9 @@ type LocalSlot struct {
func (s LocalSlot) Name() string { func (s LocalSlot) Name() string {
if s.Off == 0 { if s.Off == 0 {
return fmt.Sprintf("%s[%s]", s.N, s.Type) return fmt.Sprintf("%v[%v]", s.N, s.Type)
} }
return fmt.Sprintf("%s+%d[%s]", s.N, s.Off, s.Type) return fmt.Sprintf("%v+%d[%v]", s.N, s.Off, s.Type)
} }
type LocPair [2]Location type LocPair [2]Location
......
...@@ -97,7 +97,7 @@ func (v *Value) AuxValAndOff() ValAndOff { ...@@ -97,7 +97,7 @@ func (v *Value) AuxValAndOff() ValAndOff {
// long form print. v# = opcode <type> [aux] args [: reg] // long form print. v# = opcode <type> [aux] args [: reg]
func (v *Value) LongString() string { func (v *Value) LongString() string {
s := fmt.Sprintf("v%d = %s", v.ID, v.Op.String()) s := fmt.Sprintf("v%d = %s", v.ID, v.Op)
s += " <" + v.Type.String() + ">" s += " <" + v.Type.String() + ">"
s += v.auxString() s += v.auxString()
for _, a := range v.Args { for _, a := range v.Args {
...@@ -134,12 +134,12 @@ func (v *Value) auxString() string { ...@@ -134,12 +134,12 @@ func (v *Value) auxString() string {
return fmt.Sprintf(" {%q}", v.Aux) return fmt.Sprintf(" {%q}", v.Aux)
case auxSym: case auxSym:
if v.Aux != nil { if v.Aux != nil {
return fmt.Sprintf(" {%s}", v.Aux) return fmt.Sprintf(" {%v}", v.Aux)
} }
case auxSymOff, auxSymInt32: case auxSymOff, auxSymInt32:
s := "" s := ""
if v.Aux != nil { if v.Aux != nil {
s = fmt.Sprintf(" {%s}", v.Aux) s = fmt.Sprintf(" {%v}", v.Aux)
} }
if v.AuxInt != 0 { if v.AuxInt != 0 {
s += fmt.Sprintf(" [%v]", v.AuxInt) s += fmt.Sprintf(" [%v]", v.AuxInt)
...@@ -148,7 +148,7 @@ func (v *Value) auxString() string { ...@@ -148,7 +148,7 @@ func (v *Value) auxString() string {
case auxSymValAndOff: case auxSymValAndOff:
s := "" s := ""
if v.Aux != nil { if v.Aux != nil {
s = fmt.Sprintf(" {%s}", v.Aux) s = fmt.Sprintf(" {%v}", v.Aux)
} }
return s + fmt.Sprintf(" [%s]", v.AuxValAndOff()) return s + fmt.Sprintf(" [%s]", v.AuxValAndOff())
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment