aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/pkginit
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2020-12-28 19:34:35 -0800
committerMatthew Dempsky <mdempsky@google.com>2020-12-29 07:54:55 +0000
commitec59b197d5d92ad758c3214d906f9c750cd5b84e (patch)
treed83396ceef75c88b80e5d0f4bddb1c83b6745ba4 /src/cmd/compile/internal/pkginit
parent25c613c02dabb45f3a3dc038a8f01c664d98731a (diff)
downloadgo-ec59b197d5d92ad758c3214d906f9c750cd5b84e.tar.gz
go-ec59b197d5d92ad758c3214d906f9c750cd5b84e.zip
[dev.regabi] cmd/compile: rewrite to use linksym helpers [generated]
Passes toolstash -cmp. [git-generate] cd src/cmd/compile/internal/gc pkgs=$(grep -l -w Linksym ../*/*.go | xargs dirname | grep -v '/gc$' | sort -u) rf ' ex . '"$(echo $pkgs)"' { import "cmd/compile/internal/ir" import "cmd/compile/internal/reflectdata" import "cmd/compile/internal/staticdata" import "cmd/compile/internal/types" avoid reflectdata.TypeLinksym avoid reflectdata.TypeLinksymLookup avoid reflectdata.TypeLinksymPrefix avoid staticdata.FuncLinksym var f *ir.Func var n *ir.Name var s string var t *types.Type f.Sym().Linksym() -> f.Linksym() n.Sym().Linksym() -> n.Linksym() reflectdata.TypeSym(t).Linksym() -> reflectdata.TypeLinksym(t) reflectdata.TypeSymPrefix(s, t).Linksym() -> reflectdata.TypeLinksymPrefix(s, t) staticdata.FuncSym(n.Sym()).Linksym() -> staticdata.FuncLinksym(n) types.TypeSymLookup(s).Linksym() -> reflectdata.TypeLinksymLookup(s) } ' Change-Id: I7a3ae1dcd61bcdf4a29f708ff12f7f80c2b280c6 Reviewed-on: https://go-review.googlesource.com/c/go/+/280640 Trust: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Diffstat (limited to 'src/cmd/compile/internal/pkginit')
-rw-r--r--src/cmd/compile/internal/pkginit/init.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/compile/internal/pkginit/init.go b/src/cmd/compile/internal/pkginit/init.go
index f964edee88..8e3592700c 100644
--- a/src/cmd/compile/internal/pkginit/init.go
+++ b/src/cmd/compile/internal/pkginit/init.go
@@ -34,7 +34,7 @@ func Task() *ir.Name {
if n.Op() != ir.ONAME || n.(*ir.Name).Class_ != ir.PEXTERN {
base.Fatalf("bad inittask: %v", n)
}
- deps = append(deps, n.(*ir.Name).Sym().Linksym())
+ deps = append(deps, n.(*ir.Name).Linksym())
}
// Make a function that contains all the initialization statements.
@@ -74,7 +74,7 @@ func Task() *ir.Name {
continue
}
}
- fns = append(fns, fn.Nname.Sym().Linksym())
+ fns = append(fns, fn.Nname.Linksym())
}
if len(deps) == 0 && len(fns) == 0 && types.LocalPkg.Name != "main" && types.LocalPkg.Name != "runtime" {