mirror of
https://github.com/golang/go.git
synced 2025-05-18 22:04:38 +00:00
cmd/compile/internal/gc: eliminate bstdout
Just use Ctxt.Bso instead. Change-Id: I68f1639f0b4c238ae5499ef49e78a5d734417979 Reviewed-on: https://go-review.googlesource.com/29114 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
ae4aac00bb
commit
2b5c18c99e
@ -5,7 +5,6 @@
|
|||||||
package gc
|
package gc
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bufio"
|
|
||||||
"cmd/compile/internal/ssa"
|
"cmd/compile/internal/ssa"
|
||||||
"cmd/internal/bio"
|
"cmd/internal/bio"
|
||||||
"cmd/internal/obj"
|
"cmd/internal/obj"
|
||||||
@ -285,8 +284,6 @@ var Ctxt *obj.Link
|
|||||||
|
|
||||||
var writearchive bool
|
var writearchive bool
|
||||||
|
|
||||||
var bstdout *bufio.Writer
|
|
||||||
|
|
||||||
var Nacl bool
|
var Nacl bool
|
||||||
|
|
||||||
var continpc *obj.Prog
|
var continpc *obj.Prog
|
||||||
|
@ -107,8 +107,7 @@ func Main() {
|
|||||||
|
|
||||||
Ctxt = obj.Linknew(Thearch.LinkArch)
|
Ctxt = obj.Linknew(Thearch.LinkArch)
|
||||||
Ctxt.DiagFunc = Yyerror
|
Ctxt.DiagFunc = Yyerror
|
||||||
bstdout = bufio.NewWriter(os.Stdout)
|
Ctxt.Bso = bufio.NewWriter(os.Stdout)
|
||||||
Ctxt.Bso = bstdout
|
|
||||||
|
|
||||||
localpkg = mkpkg("")
|
localpkg = mkpkg("")
|
||||||
localpkg.Prefix = "\"\""
|
localpkg.Prefix = "\"\""
|
||||||
|
@ -59,7 +59,7 @@ func (x byLineno) Less(i, j int) bool { return x[i].lineno < x[j].lineno }
|
|||||||
func (x byLineno) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
|
func (x byLineno) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
|
||||||
|
|
||||||
func Flusherrors() {
|
func Flusherrors() {
|
||||||
bstdout.Flush()
|
Ctxt.Bso.Flush()
|
||||||
if len(errors) == 0 {
|
if len(errors) == 0 {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user