[dev.regabi] cmd/compile: finish cleanup of Debug parsing

Now that the debug settings are in a struct, use struct tags to set
the usage messages and use reflection to populate debugtab,
much like we did for the Flag struct.

Change-Id: Id2ba30c30a9158c062527715a68bf4dd94679457
Reviewed-on: https://go-review.googlesource.com/c/go/+/272247
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
Russ Cox 2020-11-16 01:44:47 -05:00
parent 3c240f5d17
commit eb3086e5a8
3 changed files with 164 additions and 137 deletions

View file

@ -10,7 +10,7 @@ import (
"bufio"
"bytes"
"cmd/compile/internal/logopt"
"cmd/compile/internal/ssa"
"cmd/compile/internal/types"
"cmd/internal/bio"
"cmd/internal/dwarf"
@ -112,6 +112,7 @@ func Main(archInit func(*Arch)) {
// pseudo-package used for methods with anonymous receivers
gopkg = types.NewPkg("go", "")
DebugSSA = ssa.PhaseOption
ParseFlags()
// Record flags that affect the build result. (And don't