mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: replace opnames with stringer
Now possible, since stringer just got the -trimprefix flag added. While at it, simplify a few Op stringifications since we can now use %v, and no longer have to worry about o<len(opnames). Passes toolstash -cmp on std cmd. Fixes #15462. Change-Id: Icdcde0b0a5eb165d18488918175024da274f782b Reviewed-on: https://go-review.googlesource.com/76790 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> Reviewed-by: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Dave Cheney <dave@cheney.net>
This commit is contained in:
parent
366681cc06
commit
3231d4e4ef
7 changed files with 25 additions and 172 deletions
|
|
@ -631,6 +631,7 @@ var knownFormats = map[string]string{
|
|||
"cmd/compile/internal/gc.Nodes %.v": "",
|
||||
"cmd/compile/internal/gc.Nodes %v": "",
|
||||
"cmd/compile/internal/gc.Op %#v": "",
|
||||
"cmd/compile/internal/gc.Op %d": "",
|
||||
"cmd/compile/internal/gc.Op %v": "",
|
||||
"cmd/compile/internal/gc.Val %#v": "",
|
||||
"cmd/compile/internal/gc.Val %T": "",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue