diff --git a/src/V3Ast.h b/src/V3Ast.h index ddd86aee2..4c078a870 100644 --- a/src/V3Ast.h +++ b/src/V3Ast.h @@ -51,7 +51,10 @@ typedef std::set MTaskIdSet; // Set of mtaskIds for Var sorting //###################################################################### // For broken() function, return error string if have a match -#define BROKEN_RTN(test) do { if (VL_UNCOVERABLE(test)) return # test; } while(0) +#define BROKEN_RTN(test) \ + do { \ + if (VL_UNCOVERABLE(test)) return #test; \ + } while (0) // (V)erilator (N)ode is: True if AstNode is of a a given AstType #define VN_IS(nodep,nodetypename) (AstNode::privateIs ## nodetypename(nodep)) diff --git a/src/V3AstNodes.h b/src/V3AstNodes.h index 865014825..f1f333772 100644 --- a/src/V3AstNodes.h +++ b/src/V3AstNodes.h @@ -1367,7 +1367,7 @@ public: }; class AstCMethodHard : public AstNodeStmt { - // A reference to a "C" hardocded member task (or function) + // A reference to a "C" hardcoded member task (or function) // PARENTS: stmt/math // Not all calls are statments vs math. AstNodeStmt needs isStatement() to deal. private: diff --git a/src/V3LinkDot.cpp b/src/V3LinkDot.cpp index ba05aaf6b..d3cf053b3 100644 --- a/src/V3LinkDot.cpp +++ b/src/V3LinkDot.cpp @@ -1098,13 +1098,12 @@ class LinkDotFindVisitor : public AstNVisitor { } } virtual void visit(AstTypedef* nodep) { - // Remember its name for later resolution - UASSERT_OBJ(m_curSymp, nodep, "Typedef not under module?"); + UASSERT_OBJ(m_curSymp, nodep, "Typedef not under module/package/$unit"); iterateChildren(nodep); m_statep->insertSym(m_curSymp, nodep->name(), nodep, m_packagep); } virtual void visit(AstParamTypeDType* nodep) { - UASSERT_OBJ(m_curSymp, nodep, "Parameter type not under module?"); + UASSERT_OBJ(m_curSymp, nodep, "Parameter type not under module/package/$unit"); iterateChildren(nodep); m_statep->insertSym(m_curSymp, nodep->name(), nodep, m_packagep); } diff --git a/src/V3Name.cpp b/src/V3Name.cpp index aba43f7c2..838c2f086 100644 --- a/src/V3Name.cpp +++ b/src/V3Name.cpp @@ -59,6 +59,7 @@ private: if (addPvt) { string newname = string("__PVT__")+nodep->name(); nodep->name(newname); + nodep->editCountInc(); } else { string rsvd = m_words.isKeyword(nodep->name()); if (rsvd != "") { @@ -66,6 +67,7 @@ private: +": "<prettyNameQ()); string newname = string("__SYM__")+nodep->name(); nodep->name(newname); + nodep->editCountInc(); } } nodep->user1(1);