[dev.ssa] cmd/compile/ssa: add checks for nil args in values

These additional checks were useful in
tracking down the broken build (CL 11238).

This CL does not fix the build, sadly.

Change-Id: I34de3bed223f450aaa97c1cadaba2e4e5850050b
Reviewed-on: https://go-review.googlesource.com/11681
Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
Josh Bleecher Snyder 2015-06-29 11:56:28 -07:00
parent 66b47812eb
commit 596ddf4368
3 changed files with 14 additions and 2 deletions

View file

@ -49,7 +49,9 @@ func fprintFunc(w io.Writer, f *Func) {
continue
}
for _, w := range v.Args {
if w.Block == b && !printed[w.ID] {
// w == nil shouldn't happen, but if it does,
// don't panic; we'll get a better diagnosis later.
if w != nil && w.Block == b && !printed[w.ID] {
continue outer
}
}