go/ssa: create an 'init' function even if len(files)==0
Package "unsafe" has no files, and is treated like a regular package since https://go-review.googlesource.com/37710, and the interpreter needs an init function with a body for every package. Change-Id: I27bd7cdb1ecaf01d0b5ed91db57145d1b4f551e1 Reviewed-on: https://go-review.googlesource.com/37711 Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
parent
f5a6ee1ea9
commit
181cdfd456
|
|
@ -2263,10 +2263,6 @@ func (p *Package) build() {
|
|||
if p.info == nil {
|
||||
return // synthetic package, e.g. "testmain"
|
||||
}
|
||||
if p.files == nil {
|
||||
p.info = nil
|
||||
return // package loaded from export data
|
||||
}
|
||||
|
||||
// Ensure we have runtime type info for all exported members.
|
||||
// TODO(adonovan): ideally belongs in memberFromObject, but
|
||||
|
|
|
|||
Loading…
Reference in New Issue