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
+2 -3
View File
@@ -94,9 +94,8 @@ void GraphPathChecker::initHalfCriticalPaths(GraphWay way, bool checkOnly) {
GraphPCNode* ourUserp = static_cast<GraphPCNode*>(vertexp->userp());
if (checkOnly) {
if (VL_UNCOVERABLE(ourUserp->m_cp[way] != critPathCost)) {
vertexp->v3fatalSrc("Validation of critical paths failed");
}
UASSERT_OBJ(ourUserp->m_cp[way] == critPathCost,
vertexp, "Validation of critical paths failed");
} else {
ourUserp->m_cp[way] = critPathCost;
}