mirror of
https://github.com/golang/go
synced 2024-11-18 17:54:57 -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 {
|
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 {
|
|||||||
|
|
||||||
// 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 {
|
|||||||
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 {
|
|||||||
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())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user