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>
diff --git a/go/gcimporter15/bimport.go b/go/gcimporter15/bimport.go
index 1936a7f..6709e43 100644
--- a/go/gcimporter15/bimport.go
+++ b/go/gcimporter15/bimport.go
@@ -104,10 +104,10 @@
// 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 @@
} 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 == "" {