aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/staticdata
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2021-01-17 02:38:41 -0800
committerMatthew Dempsky <mdempsky@google.com>2021-01-19 02:41:42 +0000
commit4a4212c0e59dee4458be2f5c85262e54f127c500 (patch)
tree77ec7dd6539ebd89c751fbcc8278812b9e1922e1 /src/cmd/compile/internal/staticdata
parent4f5c603c0f4375d7612feedfd4d5bef41a4060ee (diff)
downloadgo-4a4212c0e59dee4458be2f5c85262e54f127c500.tar.gz
go-4a4212c0e59dee4458be2f5c85262e54f127c500.zip
[dev.regabi] cmd/compile: refactor Linksym creation
Currently there's a lot of logic within package types for creating Linksyms. This CL pulls it out into base, where it can be more easily reused by other compiler code that shouldn't need to depend on package types. Package base probably isn't the best place for this, but it's convenient because it's a package that types already depends on. It's also where the Ctxt object lives, which these functions depend upon. Passes toolstash -cmp w/ -gcflags=all=-abiwrap. Change-Id: I50d8b7e4596955205036969eab24d7dab053b363 Reviewed-on: https://go-review.googlesource.com/c/go/+/284231 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com> Trust: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'src/cmd/compile/internal/staticdata')
-rw-r--r--src/cmd/compile/internal/staticdata/data.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/staticdata/data.go b/src/cmd/compile/internal/staticdata/data.go
index 6ef99b50c7..b06fd7aa4b 100644
--- a/src/cmd/compile/internal/staticdata/data.go
+++ b/src/cmd/compile/internal/staticdata/data.go
@@ -287,7 +287,7 @@ func NeedFuncSym(s *types.Sym) {
func WriteFuncSyms() {
sort.Slice(funcsyms, func(i, j int) bool {
- return funcsyms[i].LinksymName() < funcsyms[j].LinksymName()
+ return funcsyms[i].Linksym().Name < funcsyms[j].Linksym().Name
})
for _, s := range funcsyms {
sf := s.Pkg.Lookup(ir.FuncSymName(s)).Linksym()