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 {
func (s LocalSlot) Name() string {
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
......
......@@ -97,7 +97,7 @@ func (v *Value) AuxValAndOff() ValAndOff {
// long form print. v# = opcode <type> [aux] args [: reg]
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.auxString()
for _, a := range v.Args {
......@@ -134,12 +134,12 @@ func (v *Value) auxString() string {
return fmt.Sprintf(" {%q}", v.Aux)
case auxSym:
if v.Aux != nil {
return fmt.Sprintf(" {%s}", v.Aux)
return fmt.Sprintf(" {%v}", v.Aux)
}
case auxSymOff, auxSymInt32:
s := ""
if v.Aux != nil {
s = fmt.Sprintf(" {%s}", v.Aux)
s = fmt.Sprintf(" {%v}", v.Aux)
}
if v.AuxInt != 0 {
s += fmt.Sprintf(" [%v]", v.AuxInt)
......@@ -148,7 +148,7 @@ func (v *Value) auxString() string {
case auxSymValAndOff:
s := ""
if v.Aux != nil {
s = fmt.Sprintf(" {%s}", v.Aux)
s = fmt.Sprintf(" {%v}", v.Aux)
}
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