diff options
author | Russ Cox <rsc@golang.org> | 2020-12-05 15:20:51 -0500 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2020-12-07 20:40:52 +0000 |
commit | fb17dfa43d1c8e08d08f380ea082195d1c4f89f4 (patch) | |
tree | 1566775970697cd8435d0beb7a0cfc1421a44a05 /src/cmd/compile/internal/types/sym.go | |
parent | 3b25f3c1504cdc8f2263d68436df42042251b290 (diff) | |
download | go-fb17dfa43d1c8e08d08f380ea082195d1c4f89f4.tar.gz go-fb17dfa43d1c8e08d08f380ea082195d1c4f89f4.zip |
[dev.regabi] cmd/compile: narrow interface between ir and types
Narrow the interface between package ir and package types
to make it easier to clean up the type formatting code all in one place.
Also introduce ir.BlankSym for use by OrigSym, so that later
OrigSym can move to package types without needing to reference
a variable of type ir.Node.
Passes buildall w/ toolstash -cmp.
Change-Id: I39fa419a1c8fb3318203e31cacc8d06399deeff9
Reviewed-on: https://go-review.googlesource.com/c/go/+/275776
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'src/cmd/compile/internal/types/sym.go')
-rw-r--r-- | src/cmd/compile/internal/types/sym.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cmd/compile/internal/types/sym.go b/src/cmd/compile/internal/types/sym.go index 490222d843..fcb095c53c 100644 --- a/src/cmd/compile/internal/types/sym.go +++ b/src/cmd/compile/internal/types/sym.go @@ -5,6 +5,7 @@ package types import ( + "cmd/compile/internal/base" "cmd/internal/obj" "cmd/internal/src" "unicode" @@ -88,9 +89,9 @@ func (sym *Sym) Linksym() *obj.LSym { } if sym.Func() { // This is a function symbol. Mark it as "internal ABI". - return Ctxt.LookupABIInit(sym.LinksymName(), obj.ABIInternal, initPkg) + return base.Ctxt.LookupABIInit(sym.LinksymName(), obj.ABIInternal, initPkg) } - return Ctxt.LookupInit(sym.LinksymName(), initPkg) + return base.Ctxt.LookupInit(sym.LinksymName(), initPkg) } // Less reports whether symbol a is ordered before symbol b. |