Visitors that just accept netlists should say so. No functional change

This commit is contained in:
Wilson Snyder
2009-10-01 22:33:11 -04:00
parent 9499047f8e
commit 03c5d06107
16 changed files with 28 additions and 42 deletions
+4 -7
View File
@@ -280,8 +280,7 @@ private:
virtual void visit(AstAlways* nodep, AstNUser*) {
AstNode* cmtp = new AstComment(nodep->fileline(), nodep->typeName());
nodep->replaceWith(cmtp);
AstNode* stmtsp = nodep->bodysp();
if (stmtsp) {
if (AstNode* stmtsp = nodep->bodysp()) {
stmtsp->unlinkFrBackWithNext();
cmtp->addNextHere(stmtsp);
}
@@ -290,8 +289,7 @@ private:
virtual void visit(AstAlwaysPost* nodep, AstNUser*) {
AstNode* cmtp = new AstComment(nodep->fileline(), nodep->typeName());
nodep->replaceWith(cmtp);
AstNode* stmtsp = nodep->bodysp();
if (stmtsp) {
if (AstNode* stmtsp = nodep->bodysp()) {
stmtsp->unlinkFrBackWithNext();
cmtp->addNextHere(stmtsp);
}
@@ -320,8 +318,7 @@ private:
virtual void visit(AstInitial* nodep, AstNUser*) {
AstNode* cmtp = new AstComment(nodep->fileline(), nodep->typeName());
nodep->replaceWith(cmtp);
AstNode* stmtsp = nodep->bodysp();
if (stmtsp) {
if (AstNode* stmtsp = nodep->bodysp()) {
stmtsp->unlinkFrBackWithNext();
cmtp->addNextHere(stmtsp);
}
@@ -534,7 +531,7 @@ private:
public:
// CONSTUCTORS
ClockVisitor(AstNode* nodep) {
ClockVisitor(AstNetlist* nodep) {
m_modp=NULL; m_activep=NULL;
m_evalFuncp = NULL;
m_topScopep=NULL;