diff options
| author | Dave Cheney <dave@cheney.net> | 2016-08-25 12:32:42 +1000 |
|---|---|---|
| committer | Dave Cheney <dave@cheney.net> | 2016-08-25 03:34:06 +0000 |
| commit | d61c07ffd81b804cbd746ed1dc1e0d9c8b7fca49 (patch) | |
| tree | 23045f09d88bd23c9e58eba9c4f2620d5e781317 /src/cmd/internal/obj/mips/obj0.go | |
| parent | 5f94ff4c8702e05bdee32b4a5dc6f8c736adab38 (diff) | |
| download | go-d61c07ffd81b804cbd746ed1dc1e0d9c8b7fca49.tar.xz | |
cmd/link/internal, cmd/internal/obj: introduce ctxt.Logf
Replace the various calls to Fprintf(ctxt.Bso, ...) with a helper,
ctxt.Logf. This also addresses the various inconsistent flushing of
ctxt.Bso.
Because we have two Link structures, add Link.Logf in both places.
Change-Id: I23093f9b9b3bf33089a0ffd7f815f92dcd1a1fa1
Reviewed-on: https://go-review.googlesource.com/27730
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'src/cmd/internal/obj/mips/obj0.go')
| -rw-r--r-- | src/cmd/internal/obj/mips/obj0.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/cmd/internal/obj/mips/obj0.go b/src/cmd/internal/obj/mips/obj0.go index 56a47f9c1b..6f2c5bbbfc 100644 --- a/src/cmd/internal/obj/mips/obj0.go +++ b/src/cmd/internal/obj/mips/obj0.go @@ -144,8 +144,7 @@ func preprocess(ctxt *obj.Link, cursym *obj.LSym) { * expand BECOME pseudo */ if ctxt.Debugvlog != 0 { - fmt.Fprintf(ctxt.Bso, "%5.2f noops\n", obj.Cputime()) - ctxt.Bso.Flush() + ctxt.Logf("%5.2f noops\n", obj.Cputime()) } var q *obj.Prog @@ -293,8 +292,7 @@ func preprocess(ctxt *obj.Link, cursym *obj.LSym) { } else if cursym.Text.Mark&LEAF == 0 { if cursym.Text.From3.Offset&obj.NOSPLIT != 0 { if ctxt.Debugvlog != 0 { - fmt.Fprintf(ctxt.Bso, "save suppressed in: %s\n", cursym.Name) - ctxt.Bso.Flush() + ctxt.Logf("save suppressed in: %s\n", cursym.Name) } cursym.Text.Mark |= LEAF |
