cmd/compile/internal: replace direct calls to Sym.LinksymABI

Using (*Sym).LinksymABI(abi) directly is not recommended.

Replace with (*ir.Name).LinksymABI(abi).
This commit is contained in:
apocelipes 2024-03-05 00:54:23 +09:00
parent e39480f4fb
commit 6787b65716
1 changed files with 1 additions and 1 deletions

View File

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