mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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>
This commit is contained in:
parent
5f94ff4c87
commit
d61c07ffd8
29 changed files with 141 additions and 190 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue