diff options
| author | Keith Randall <khr@golang.org> | 2016-09-16 16:56:29 -0700 |
|---|---|---|
| committer | Keith Randall <khr@golang.org> | 2016-09-17 02:54:11 +0000 |
| commit | 2e2db7a1704773082db547cbde70d8c0ce36a10c (patch) | |
| tree | 93e899c90371f9f0941e73a88e3c1e2b2b4a7acc /src | |
| parent | 246074d043f686c532cac88dccd68e01048a23bc (diff) | |
| download | go-2e2db7a1704773082db547cbde70d8c0ce36a10c.tar.xz | |
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>
Diffstat (limited to 'src')
| -rw-r--r-- | src/cmd/compile/internal/ssa/location.go | 4 | ||||
| -rw-r--r-- | src/cmd/compile/internal/ssa/value.go | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/cmd/compile/internal/ssa/location.go b/src/cmd/compile/internal/ssa/location.go index b6de3ea064..f9eaedf092 100644 --- a/src/cmd/compile/internal/ssa/location.go +++ b/src/cmd/compile/internal/ssa/location.go @@ -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 diff --git a/src/cmd/compile/internal/ssa/value.go b/src/cmd/compile/internal/ssa/value.go index 71955aaddd..b53e41cf28 100644 --- a/src/cmd/compile/internal/ssa/value.go +++ b/src/cmd/compile/internal/ssa/value.go @@ -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()) } |
