]> Cypherpunks.ru repositories - gostls13.git/commit
[dev.regabi] cmd/compile: untangle FmtFlag, FmtMode
authorRuss Cox <rsc@golang.org>
Sun, 6 Dec 2020 18:17:03 +0000 (13:17 -0500)
committerRuss Cox <rsc@golang.org>
Mon, 7 Dec 2020 20:41:03 +0000 (20:41 +0000)
commit70155cca81d061686d4f23b7ad59fe8213e87f9f
treedfdb2475a6ec5dc89e0992a91b8c7c1402af97db
parent3904a6282945276ec72683920c278b2e3141a1fe
[dev.regabi] cmd/compile: untangle FmtFlag, FmtMode

It turns out that the FmtFlag is really only tracking the FmtLong and FmtShort bits,
and the others simply mirror the state of the FmtMode and are copied out and
back in repeatedly.

Simplify to FmtFlag being the verb itself ('S', 'L', or 'v').

Now there is only one formatting enumeration, making it a bit
easier to understand what's going on.

Passes buildall w/ toolstash -cmp.

Change-Id: I85bde2183eb22228fcf46d19d003401d588d9825
Reviewed-on: https://go-review.googlesource.com/c/go/+/275778
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/gc/const.go
src/cmd/compile/internal/ir/fmt.go