From 1abefc1ff0ae6a3f3df7affa704cd2c71ab48a05 Mon Sep 17 00:00:00 2001 From: Josh Bleecher Snyder Date: Tue, 25 Oct 2016 05:45:52 -0700 Subject: [PATCH] cmd/compile: clean up rule logging helpers Introduced in CLs 29380 and 30011. Change-Id: I3d3641e8748ce0adb57b087a1fcd62f295ade665 Reviewed-on: https://go-review.googlesource.com/31933 Run-TryBot: Josh Bleecher Snyder TryBot-Result: Gobot Gobot Reviewed-by: Cherry Zhang --- src/cmd/compile/internal/ssa/rewrite.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cmd/compile/internal/ssa/rewrite.go b/src/cmd/compile/internal/ssa/rewrite.go index 9c481034ce..1f9a90ff35 100644 --- a/src/cmd/compile/internal/ssa/rewrite.go +++ b/src/cmd/compile/internal/ssa/rewrite.go @@ -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 } -- 2.48.1