mirror of
https://github.com/verilator/verilator.git
synced 2026-09-02 10:48:27 +02:00
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:
+2
-2
@@ -82,7 +82,7 @@ private:
|
||||
string newvarname = string("__Vilp");
|
||||
varp = new AstVar(fl, AstVarType::STMTTEMP,
|
||||
newvarname, VFlagLogicPacked(), 32);
|
||||
if (!cfuncp) fl->v3fatalSrc("Assignment not under a function");
|
||||
UASSERT_OBJ(cfuncp, fl, "Assignment not under a function");
|
||||
cfuncp->addInitsp(varp);
|
||||
cfuncp->user1p(varp);
|
||||
}
|
||||
@@ -101,7 +101,7 @@ private:
|
||||
|
||||
// Transform first assign into for loop body
|
||||
AstNodeAssign* bodyp = m_mgAssignps.front();
|
||||
if (bodyp->lhsp() != m_mgSelLp) bodyp->v3fatalSrc("Corrupt queue/state");
|
||||
UASSERT_OBJ(bodyp->lhsp() == m_mgSelLp, bodyp, "Corrupt queue/state");
|
||||
FileLine* fl = bodyp->fileline();
|
||||
AstVar* itp = findCreateVarTemp(fl, m_mgCfuncp);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user