cmd/internal/obj: various code cleanups

Mostly replacing C-Style loops with range expressions, but also other
simplifications like the introduction of writeBool and unindenting some
code.

Passes toolstash -cmp on std cmd.

Change-Id: I799bccd4e5d411428dcf122b8588a564a9217e7c
Reviewed-on: https://go-review.googlesource.com/104936
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Marvin Stenger <marvin.stenger94@gmail.com>
Reviewed-by: Ilya Tocar <ilya.tocar@intel.com>
This commit is contained in:
Daniel Martí 2018-04-05 12:11:32 +01:00
parent 47427d67d6
commit e8aa9a533d
4 changed files with 45 additions and 55 deletions

View file

@ -165,10 +165,6 @@ func (ctxt *Link) CanReuseProgs() bool {
return !ctxt.Debugasm
}
func (ctxt *Link) Dconv(a *Addr) string {
return Dconv(nil, a)
}
func Dconv(p *Prog, a *Addr) string {
var str string