mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +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
1 changed files with 1 additions and 1 deletions
|
|
@ -539,7 +539,7 @@ func FuncPC(pos src.XPos, n Node, wantABI obj.ABI) Node {
|
||||||
if abi != wantABI {
|
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)
|
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 = NewAddrExpr(pos, e)
|
||||||
e.SetType(types.Types[types.TUINTPTR].PtrTo())
|
e.SetType(types.Types[types.TUINTPTR].PtrTo())
|
||||||
e = NewConvExpr(pos, OCONVNOP, types.Types[types.TUINTPTR], e)
|
e = NewConvExpr(pos, OCONVNOP, types.Types[types.TUINTPTR], e)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue