go/gcimporter15: support bimport format v6

Format change introduced by golang.org/cl/105038.

Change-Id: I76eefe9ce7f52743cb5cdcfe77e5ee0b5eb8743f
Reviewed-on: https://go-review.googlesource.com/105976
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Matthew Dempsky 2018-04-09 16:27:07 -07:00
parent ac136b6c2d
commit 14d5b80f95
1 changed files with 5 additions and 2 deletions

View File

@ -104,10 +104,10 @@ func BImportData(fset *token.FileSet, imports map[string]*types.Package, data []
// read version specific flags - extend as necessary
switch p.version {
// case 6:
// case 7:
// ...
// fallthrough
case 5, 4, 3, 2, 1:
case 6, 5, 4, 3, 2, 1:
p.debugFormat = p.rawStringln(p.rawByte()) == "debug"
p.trackAllTypes = p.int() != 0
p.posInfoFormat = p.int() != 0
@ -184,6 +184,9 @@ func (p *importer) pkg() *types.Package {
} else {
path = p.string()
}
if p.version >= 6 {
p.int() // package height; unused by go/types
}
// we should never see an empty package name
if name == "" {