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:
Matthew Dempsky 2022-05-12 15:45:13 -07:00
parent b6c5a5baa7
commit 1973be519a
3 changed files with 4 additions and 4 deletions

View file

@ -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)