diff options
author | Matthew Dempsky <mdempsky@google.com> | 2020-12-28 19:34:35 -0800 |
---|---|---|
committer | Matthew Dempsky <mdempsky@google.com> | 2020-12-29 07:54:55 +0000 |
commit | ec59b197d5d92ad758c3214d906f9c750cd5b84e (patch) | |
tree | d83396ceef75c88b80e5d0f4bddb1c83b6745ba4 /src/cmd/compile/internal/walk/complit.go | |
parent | 25c613c02dabb45f3a3dc038a8f01c664d98731a (diff) | |
download | go-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/walk/complit.go')
-rw-r--r-- | src/cmd/compile/internal/walk/complit.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/walk/complit.go b/src/cmd/compile/internal/walk/complit.go index fadcd87f25..3c28ed70ad 100644 --- a/src/cmd/compile/internal/walk/complit.go +++ b/src/cmd/compile/internal/walk/complit.go @@ -59,7 +59,7 @@ func (c initContext) String() string { func readonlystaticname(t *types.Type) *ir.Name { n := staticinit.StaticName(t) n.MarkReadonly() - n.Sym().Linksym().Set(obj.AttrContentAddressable, true) + n.Linksym().Set(obj.AttrContentAddressable, true) return n } |