cmd/compile: change the type of ssa Warnl line number

Line numbers are always int32, so the Warnl function should take the
line number as an int32 as well.  This matches gc.Warnl and removes
a cast every place it's used.

Change-Id: I5d6201e640d52ec390eb7174f8fd8c438d4efe58
Reviewed-on: https://go-review.googlesource.com/20662
Run-TryBot: Todd Neal <todd@tneal.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
Todd Neal 2016-03-13 23:04:31 -05:00
parent 2dcbbbd193
commit 98b88de56f
8 changed files with 22 additions and 22 deletions

View file

@ -371,13 +371,13 @@ func simplifyBlock(ft *factsTable, b *Block) branch {
m := ft.get(nil, b.Control, boolean)
if m == lt|gt {
if b.Func.pass.debug > 0 {
b.Func.Config.Warnl(int(b.Line), "Proved boolean %s", b.Control.Op)
b.Func.Config.Warnl(b.Line, "Proved boolean %s", b.Control.Op)
}
return positive
}
if m == eq {
if b.Func.pass.debug > 0 {
b.Func.Config.Warnl(int(b.Line), "Disproved boolean %s", b.Control.Op)
b.Func.Config.Warnl(b.Line, "Disproved boolean %s", b.Control.Op)
}
return negative
}
@ -404,13 +404,13 @@ func simplifyBlock(ft *factsTable, b *Block) branch {
m := ft.get(a0, a1, d)
if m != 0 && tr.r&m == m {
if b.Func.pass.debug > 0 {
b.Func.Config.Warnl(int(b.Line), "Proved %s", c.Op)
b.Func.Config.Warnl(b.Line, "Proved %s", c.Op)
}
return positive
}
if m != 0 && ((lt|eq|gt)^tr.r)&m == m {
if b.Func.pass.debug > 0 {
b.Func.Config.Warnl(int(b.Line), "Disproved %s", c.Op)
b.Func.Config.Warnl(b.Line, "Disproved %s", c.Op)
}
return negative
}
@ -425,7 +425,7 @@ func simplifyBlock(ft *factsTable, b *Block) branch {
m := ft.get(a0, a1, signed)
if m != 0 && tr.r&m == m {
if b.Func.pass.debug > 0 {
b.Func.Config.Warnl(int(b.Line), "Proved non-negative bounds %s", c.Op)
b.Func.Config.Warnl(b.Line, "Proved non-negative bounds %s", c.Op)
}
return positive
}