mirror of
https://github.com/golang/go
synced 2024-11-18 15:54:42 -07:00
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/29365 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
246074d043
commit
2e2db7a170
@ -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())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user