From: apocelipes Date: Mon, 4 Mar 2024 16:44:43 +0000 (+0000) Subject: cmd/compile/internal: replace direct calls to Sym.LinksymABI X-Git-Tag: go1.23rc1~1006 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=de487d561653e7f2ec7a54832c9edcb1d9754594;p=gostls13.git cmd/compile/internal: replace direct calls to Sym.LinksymABI Using (*Sym).LinksymABI(abi) directly is not recommended. Replace with (*ir.Name).LinksymABI(abi). Change-Id: I95d5d35240d4e1856ba511d828f6edefcee81b4f GitHub-Last-Rev: 6787b65716ab82d2f35cda4f3839bfd85baa41dd GitHub-Pull-Request: golang/go#66094 Reviewed-on: https://go-review.googlesource.com/c/go/+/568855 Auto-Submit: Keith Randall Reviewed-by: Keith Randall Reviewed-by: Keith Randall Reviewed-by: Michael Knyszek LUCI-TryBot-Result: Go LUCI --- diff --git a/src/cmd/compile/internal/ir/func.go b/src/cmd/compile/internal/ir/func.go index 303c5e4fd0..a74bb6ebda 100644 --- a/src/cmd/compile/internal/ir/func.go +++ b/src/cmd/compile/internal/ir/func.go @@ -539,7 +539,7 @@ func FuncPC(pos src.XPos, n Node, wantABI obj.ABI) Node { if abi != wantABI { base.ErrorfAt(pos, 0, "internal/abi.FuncPC%s expects an %v function, %s is defined as %v", wantABI, wantABI, name.Sym().Name, abi) } - var e Node = NewLinksymExpr(pos, name.Sym().LinksymABI(abi), types.Types[types.TUINTPTR]) + var e Node = NewLinksymExpr(pos, name.LinksymABI(abi), types.Types[types.TUINTPTR]) e = NewAddrExpr(pos, e) e.SetType(types.Types[types.TUINTPTR].PtrTo()) e = NewConvExpr(pos, OCONVNOP, types.Types[types.TUINTPTR], e)