]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: clean up rule logging helpers
authorJosh Bleecher Snyder <josharian@gmail.com>
Tue, 25 Oct 2016 12:45:52 +0000 (05:45 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Tue, 25 Oct 2016 13:33:57 +0000 (13:33 +0000)
Introduced in CLs 29380 and 30011.

Change-Id: I3d3641e8748ce0adb57b087a1fcd62f295ade665
Reviewed-on: https://go-review.googlesource.com/31933
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/compile/internal/ssa/rewrite.go

index 9c481034ce15c4005c31c88e51087830b763352a..1f9a90ff356945a2cb920f900800735bf42a9fd7 100644 (file)
@@ -481,7 +481,7 @@ func clobber(v *Value) bool {
 //     noteRule("note to self: rule of interest matched")
 // and that message will print when the rule matches.
 func noteRule(s string) bool {
-       println(s)
+       fmt.Println(s)
        return true
 }
 
@@ -489,7 +489,7 @@ func noteRule(s string) bool {
 // cond is true and the rule is fired.
 func warnRule(cond bool, v *Value, s string) bool {
        if cond {
-               v.Block.Func.Config.Warnl(v.Line, "removed nil check")
+               v.Block.Func.Config.Warnl(v.Line, s)
        }
        return true
 }