Internals: Add UASSERT_OBJ macro to replace hand-done ifs. No functional change intended.

This makes it easier to filter out correctly zero code-coverage lines.
This commit is contained in:
Wilson Snyder
2019-07-06 12:57:50 -04:00
parent 7e54ff1b37
commit 8548ecfdac
66 changed files with 626 additions and 653 deletions
+1 -1
View File
@@ -579,7 +579,7 @@ double V3Graph::orderDFSIterate(V3GraphVertex* vertexp) {
// Compute fanouts of each node
// If forward edge, don't double count that fanout
if (vertexp->user() == 2) return vertexp->fanout(); // Already processed it
if (vertexp->user() == 1) vertexp->v3fatalSrc("Loop found, backward edges should be dead");
UASSERT_OBJ(vertexp->user() != 1, vertexp, "Loop found, backward edges should be dead");
vertexp->user(1);
double fanout = 0;
for (V3GraphEdge* edgep = vertexp->outBeginp(); edgep; edgep = edgep->outNextp()) {