mirror of
https://github.com/golang/go
synced 2024-10-05 21:21:21 -06:00
[dev.ssa] cmd/compile: minor code cleanup
Change-Id: I9c84f5ca18745fb2358494c6944bf7ddd05cf8f0 Reviewed-on: https://go-review.googlesource.com/14332 Reviewed-by: Todd Neal <todd@tneal.org>
This commit is contained in:
parent
ec8a597cd2
commit
1b5ffda01e
@ -122,16 +122,9 @@ func checkFunc(f *Func) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, v := range b.Values {
|
for _, v := range b.Values {
|
||||||
|
switch v.Aux.(type) {
|
||||||
if _, ok := v.Aux.(bool); ok {
|
case bool, float32, float64:
|
||||||
f.Fatalf("value %v has a bool Aux value, should be AuxInt", v.LongString())
|
f.Fatalf("value %v has an Aux value of type %T, should be AuxInt", v.LongString(), v.Aux)
|
||||||
}
|
|
||||||
if _, ok := v.Aux.(float32); ok {
|
|
||||||
f.Fatalf("value %v has a float32 Aux value, should be AuxInt", v.LongString())
|
|
||||||
}
|
|
||||||
|
|
||||||
if _, ok := v.Aux.(float64); ok {
|
|
||||||
f.Fatalf("value %v has a float64 Aux value, should be AuxInt", v.LongString())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, arg := range v.Args {
|
for _, arg := range v.Args {
|
||||||
|
Loading…
Reference in New Issue
Block a user