mirror of
https://github.com/golang/go
synced 2024-09-06 00:19:45 +00:00
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: 6787b65716
GitHub-Pull-Request: golang/go#66094
Reviewed-on: https://go-review.googlesource.com/c/go/+/568855
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
parent
4c08c12593
commit
de487d5616
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue