cmd/compile/internal/gc: get rid of useless autopkg variable

autopkg == localpkg, so it appears to be a remnant of earlier code.

Change-Id: I65b6c074535e877317cbf9f1f35e94890f0ebf14
Reviewed-on: https://go-review.googlesource.com/26662
Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
Brad Fitzpatrick 2016-08-10 10:36:42 -07:00
parent 3dc082f8fe
commit 133d231a89
3 changed files with 1 additions and 5 deletions

View file

@ -156,8 +156,6 @@ var Debug_typeassert int
var localpkg *Pkg // package being compiled var localpkg *Pkg // package being compiled
var autopkg *Pkg // fake package for allocating auto variables
var importpkg *Pkg // package being imported var importpkg *Pkg // package being imported
var itabpkg *Pkg // fake pkg for itab entries var itabpkg *Pkg // fake pkg for itab entries

View file

@ -108,8 +108,6 @@ func Main() {
localpkg = mkpkg("") localpkg = mkpkg("")
localpkg.Prefix = "\"\"" localpkg.Prefix = "\"\""
autopkg = mkpkg("")
autopkg.Prefix = "\"\""
// pseudo-package, for scoping // pseudo-package, for scoping
builtinpkg = mkpkg("go.builtin") builtinpkg = mkpkg("go.builtin")

View file

@ -4521,7 +4521,7 @@ func (e *ssaExport) SplitStruct(name ssa.LocalSlot, i int) ssa.LocalSlot {
// namedAuto returns a new AUTO variable with the given name and type. // namedAuto returns a new AUTO variable with the given name and type.
func (e *ssaExport) namedAuto(name string, typ ssa.Type) ssa.GCNode { func (e *ssaExport) namedAuto(name string, typ ssa.Type) ssa.GCNode {
t := typ.(*Type) t := typ.(*Type)
s := &Sym{Name: name, Pkg: autopkg} s := &Sym{Name: name, Pkg: localpkg}
n := Nod(ONAME, nil, nil) n := Nod(ONAME, nil, nil)
s.Def = n s.Def = n
s.Def.Used = true s.Def.Used = true