1
0
mirror of https://github.com/golang/go synced 2024-11-05 18:36:10 -07:00

cmd/compile: unexport types.Sym.LSym

Response to code review feedback on CL 40693.

Remove the final reference to it from package gc,
and manually unexport.

Passes toolstash-check.

Change-Id: I7fc48edd43263d8f7c56b47aeb7573408463dc22
Reviewed-on: https://go-review.googlesource.com/41303
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
Josh Bleecher Snyder 2017-04-21 07:58:03 -07:00
parent 30940e2cc2
commit 0d50a49f5c
2 changed files with 6 additions and 5 deletions

View File

@ -1338,7 +1338,8 @@ ok:
keep = true keep = true
} }
} }
s.Lsym.Set(obj.AttrMakeTypelink, keep) // TODO(josharian): add lsym local variable above, use here instead of calling Linksym()
s.Linksym().Set(obj.AttrMakeTypelink, keep)
return s return s
} }

View File

@ -31,7 +31,7 @@ type Sym struct {
flags bitset8 flags bitset8
Label *Node // corresponding label (ephemeral) Label *Node // corresponding label (ephemeral)
Origpkg *Pkg // original package for . import Origpkg *Pkg // original package for . import
Lsym *obj.LSym lsym *obj.LSym
} }
const ( const (
@ -78,8 +78,8 @@ func (sym *Sym) Linksym() *obj.LSym {
if sym == nil { if sym == nil {
return nil return nil
} }
if sym.Lsym == nil { if sym.lsym == nil {
sym.Lsym = Ctxt.Lookup(sym.LinksymName()) sym.lsym = Ctxt.Lookup(sym.LinksymName())
} }
return sym.Lsym return sym.lsym
} }