cmd/compile: in poset, simplify usage of CheckIntegrity

Instead of returning an error, just panic: the function is
used only for debugging purposes anyway.

Change-Id: Ie81b2309daaf1efb9470992391534bce2141b3c2
Reviewed-on: https://go-review.googlesource.com/c/go/+/196779
Reviewed-by: David Chase <drchase@google.com>
This commit is contained in:
Giovanni Bajo 2019-09-22 01:31:02 +02:00
parent 490646e476
commit 0a5116493c
2 changed files with 9 additions and 24 deletions

View file

@ -146,9 +146,7 @@ func testPosetOps(t *testing.T, unsigned bool, ops []posetTestOp) {
po.DotDump(fmt.Sprintf("op%d.dot", idx), fmt.Sprintf("Last op: %v", op))
}
if err := po.CheckIntegrity(); err != nil {
t.Fatalf("op%d%v: integrity error: %v", idx, op, err)
}
po.CheckIntegrity()
}
// Check that the poset is completely empty