cmd/compile/internal: unexport gc.Oconv

Updates #15462

Semi automatic change with gofmt -r and hand fixups for callers outside
internal/gc.

All the uses of gc.Oconv outside cmd/compile/internal/gc were for the
Oconv(op, 0) form, which is already handled the Op.String method.

Replace the use of gc.Oconv(op, 0) with op itself, which will call
Op.String via the %v or %s verb. Unexport Oconv.

Change-Id: I84da2a2e4381b35f52efce427b2d6a3bccdf2526
Reviewed-on: https://go-review.googlesource.com/22496
Run-TryBot: Dave Cheney <dave@cheney.net>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
This commit is contained in:
Dave Cheney 2016-04-27 14:46:09 +10:00
parent 707aed0363
commit 8f2e780e8a
30 changed files with 115 additions and 115 deletions

View file

@ -695,7 +695,7 @@ func evconst(n *Node) {
switch uint32(n.Op)<<16 | uint32(v.Ctype()) {
default:
if n.Diag == 0 {
Yyerror("illegal constant expression %v %v", Oconv(n.Op, 0), nl.Type)
Yyerror("illegal constant expression %v %v", oconv(n.Op, 0), nl.Type)
n.Diag = 1
}
return
@ -1179,7 +1179,7 @@ setfalse:
illegal:
if n.Diag == 0 {
Yyerror("illegal constant expression: %v %v %v", nl.Type, Oconv(n.Op, 0), nr.Type)
Yyerror("illegal constant expression: %v %v %v", nl.Type, oconv(n.Op, 0), nr.Type)
n.Diag = 1
}
}