Internals: Fix some object-less asserts

This commit is contained in:
Wilson Snyder
2025-09-20 17:40:50 -04:00
parent 580a843474
commit a4db488b02
8 changed files with 16 additions and 14 deletions
+2 -2
View File
@@ -575,7 +575,7 @@ class ForkVisitor final : public VNVisitor {
if (!m_newProcess || nodep->user1()) {
VL_RESTORER(m_forkDepth);
if (nodep->user1()) {
UASSERT(m_forkDepth > 0, "Wrong fork depth!");
UASSERT_OBJ(m_forkDepth > 0, nodep, "Wrong fork depth");
--m_forkDepth;
}
iterateChildren(nodep);
@@ -601,7 +601,7 @@ class ForkVisitor final : public VNVisitor {
AstTask* taskp = nullptr;
if (AstBegin* const beginp = VN_CAST(nodep, Begin)) {
UASSERT(beginp->stmtsp(), "No stmtsp\n");
UASSERT_OBJ(beginp->stmtsp(), beginp, "No stmtsp");
const string taskName = generateTaskName(beginp, "fork_begin");
taskp
= makeTask(beginp->fileline(), beginp->stmtsp()->unlinkFrBackWithNext(), taskName);