mirror of
https://github.com/golang/go
synced 2024-11-19 00:24:41 -07:00
cmd/compile/internal/gc: unexport Export
Export does not need to be exported. Change-Id: I252f0c024732f1d056817cab13e8e3c589b54d13 Reviewed-on: https://go-review.googlesource.com/21721 Run-TryBot: Dave Cheney <dave@cheney.net> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
4dae828f77
commit
49e07f2b7e
@ -135,8 +135,8 @@ type exporter struct {
|
|||||||
trace bool
|
trace bool
|
||||||
}
|
}
|
||||||
|
|
||||||
// Export writes the exportlist for localpkg to out and returns the number of bytes written.
|
// export writes the exportlist for localpkg to out and returns the number of bytes written.
|
||||||
func Export(out *bio.Buf, trace bool) int {
|
func export(out *bio.Buf, trace bool) int {
|
||||||
p := exporter{
|
p := exporter{
|
||||||
out: out,
|
out: out,
|
||||||
pkgIndex: make(map[*Pkg]int),
|
pkgIndex: make(map[*Pkg]int),
|
||||||
|
@ -385,7 +385,7 @@ func dumpexport() {
|
|||||||
// save a copy of the export data
|
// save a copy of the export data
|
||||||
var copy bytes.Buffer
|
var copy bytes.Buffer
|
||||||
bcopy := bio.BufWriter(©)
|
bcopy := bio.BufWriter(©)
|
||||||
size = Export(bcopy, Debug_export != 0)
|
size = export(bcopy, Debug_export != 0)
|
||||||
bcopy.Flush() // flushing to bytes.Buffer cannot fail
|
bcopy.Flush() // flushing to bytes.Buffer cannot fail
|
||||||
if n, err := bout.Write(copy.Bytes()); n != size || err != nil {
|
if n, err := bout.Write(copy.Bytes()); n != size || err != nil {
|
||||||
Fatalf("error writing export data: got %d bytes, want %d bytes, err = %v", n, size, err)
|
Fatalf("error writing export data: got %d bytes, want %d bytes, err = %v", n, size, err)
|
||||||
@ -407,7 +407,7 @@ func dumpexport() {
|
|||||||
pkgs = savedPkgs
|
pkgs = savedPkgs
|
||||||
pkgMap = savedPkgMap
|
pkgMap = savedPkgMap
|
||||||
} else {
|
} else {
|
||||||
size = Export(bout, Debug_export != 0)
|
size = export(bout, Debug_export != 0)
|
||||||
}
|
}
|
||||||
exportf("\n$$\n")
|
exportf("\n$$\n")
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user