diff options
author | Daniel Martí <mvdan@mvdan.cc> | 2018-06-11 09:11:29 +0100 |
---|---|---|
committer | Daniel Martí <mvdan@mvdan.cc> | 2018-08-20 13:27:53 +0000 |
commit | 3b7b9dce43613d22ac58cc61b19268b32a157df0 (patch) | |
tree | ac9a5fef2e0303541177bda06e22c0847c0c0512 /src/cmd/compile/internal/gc/export.go | |
parent | 9e4d87d1158a5847dbb94c0fd3f6ab451460d148 (diff) | |
download | go-3b7b9dce43613d22ac58cc61b19268b32a157df0.tar.gz go-3b7b9dce43613d22ac58cc61b19268b32a157df0.zip |
cmd/compile/internal/gc: various minor cleanups
Two funcs and a field were unused. Remove them.
A few statements could be made simpler.
importsym's pos parameter was unused, so remove it.
Finally, don't use printf-like funcs with constant strings that have no
formatting directives.
Change-Id: I415452249bf2168aa353ac4f3643dfc03017ee53
Reviewed-on: https://go-review.googlesource.com/117699
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dave Cheney <dave@cheney.net>
Diffstat (limited to 'src/cmd/compile/internal/gc/export.go')
-rw-r--r-- | src/cmd/compile/internal/gc/export.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cmd/compile/internal/gc/export.go b/src/cmd/compile/internal/gc/export.go index becc4e1f3b..3aa7c39067 100644 --- a/src/cmd/compile/internal/gc/export.go +++ b/src/cmd/compile/internal/gc/export.go @@ -88,7 +88,7 @@ func dumpexport(bout *bio.Writer) { } } -func importsym(ipkg *types.Pkg, pos src.XPos, s *types.Sym, op Op) *Node { +func importsym(ipkg *types.Pkg, s *types.Sym, op Op) *Node { n := asNode(s.PkgDef()) if n == nil { // iimport should have created a stub ONONAME @@ -113,7 +113,7 @@ func importsym(ipkg *types.Pkg, pos src.XPos, s *types.Sym, op Op) *Node { // If no such type has been declared yet, a forward declaration is returned. // ipkg is the package being imported func importtype(ipkg *types.Pkg, pos src.XPos, s *types.Sym) *types.Type { - n := importsym(ipkg, pos, s, OTYPE) + n := importsym(ipkg, s, OTYPE) if n.Op != OTYPE { t := types.New(TFORW) t.Sym = s @@ -135,7 +135,7 @@ func importtype(ipkg *types.Pkg, pos src.XPos, s *types.Sym) *types.Type { // importobj declares symbol s as an imported object representable by op. // ipkg is the package being imported func importobj(ipkg *types.Pkg, pos src.XPos, s *types.Sym, op Op, ctxt Class, t *types.Type) *Node { - n := importsym(ipkg, pos, s, op) + n := importsym(ipkg, s, op) if n.Op != ONONAME { if n.Op == op && (n.Class() != ctxt || !eqtype(n.Type, t)) { redeclare(lineno, s, fmt.Sprintf("during import %q", ipkg.Path)) |