mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile/internal/noder: remove unified IR assumptions on LocalPkg.Path == ""
Replace `pkg.Path == ""` check with `pkg == types.LocalPkg`. This is a prep refactoring for CL 393715, which will properly initialize types.LocalPkg. Updates #51734. Change-Id: I7a5428ef1f422de396762b6bc6d323992834b27c Reviewed-on: https://go-review.googlesource.com/c/go/+/406056 Reviewed-by: David Chase <drchase@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
parent
b6c5a5baa7
commit
1973be519a
3 changed files with 4 additions and 4 deletions
|
|
@ -153,7 +153,7 @@ func (l *linker) relocObj(pr *pkgReader, idx int) int {
|
|||
l.relocCommon(pr, &wdict, pkgbits.RelocObjDict, idx)
|
||||
|
||||
var obj *ir.Name
|
||||
if path == "" {
|
||||
if sym.Pkg == types.LocalPkg {
|
||||
var ok bool
|
||||
obj, ok = sym.Def.(*ir.Name)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue