mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/link/internal/ld: simple cleanups
Simplify some C-style loops with range statements, and move some declarations closer to their uses. While at it, ensure that all the SymbolType consts are typed. Change-Id: I04b06afb2c1fb249ef8093a0c5cca0a597d1e05c Reviewed-on: https://go-review.googlesource.com/105217 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
ae2a2d12f6
commit
a6b183fabd
8 changed files with 47 additions and 68 deletions
|
|
@ -295,7 +295,7 @@ func (d *deadcodepass) flood() {
|
|||
|
||||
mpos := 0 // 0-3, the R_METHODOFF relocs of runtime.uncommontype
|
||||
var methods []methodref
|
||||
for i := 0; i < len(s.R); i++ {
|
||||
for i := range s.R {
|
||||
r := &s.R[i]
|
||||
if r.Sym == nil {
|
||||
continue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue