mirror of
https://github.com/golang/go
synced 2024-11-02 11:50:30 +00:00
cmd/compile: use types2.Unsafe to represent package unsafe in gcimports
Followup todo in CL 346769. Change-Id: I6c870014523426d65d135da999f97a818a997237 Reviewed-on: https://go-review.googlesource.com/c/go/+/347270 Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
9afbf82667
commit
3db4888a05
2 changed files with 1 additions and 5 deletions
|
@ -35,7 +35,7 @@ func checkFiles(noders []*noder) (posMap, *types2.Package, *types2.Info) {
|
|||
|
||||
// typechecking
|
||||
importer := gcimports{
|
||||
packages: make(map[string]*types2.Package),
|
||||
packages: map[string]*types2.Package{"unsafe": types2.Unsafe},
|
||||
}
|
||||
conf := types2.Config{
|
||||
GoVersion: base.Flag.Lang,
|
||||
|
|
|
@ -147,10 +147,6 @@ func (r *reader2) doPkg() *types2.Package {
|
|||
if path == "builtin" {
|
||||
return nil // universe
|
||||
}
|
||||
if path == "unsafe" {
|
||||
// TODO(mdempsky): This should be in r.p.imports.
|
||||
return types2.Unsafe
|
||||
}
|
||||
if path == "" {
|
||||
path = r.p.pkgPath
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue