Internals: CFunc VL_RESTORER. No functional change intended.

This commit is contained in:
Wilson Snyder
2020-10-31 09:14:47 -04:00
parent 3a53b32a32
commit e6b0479b80
15 changed files with 106 additions and 84 deletions
+9 -7
View File
@@ -150,13 +150,15 @@ private:
}
virtual void visit(AstCFunc* nodep) override {
UINFO(4, " CFUNC " << nodep << endl);
m_cfuncp = nodep;
searchFuncStmts(nodep->argsp());
searchFuncStmts(nodep->initsp());
searchFuncStmts(nodep->stmtsp());
searchFuncStmts(nodep->finalsp());
iterateChildren(nodep);
m_cfuncp = nullptr;
VL_RESTORER(m_cfuncp);
{
m_cfuncp = nodep;
searchFuncStmts(nodep->argsp());
searchFuncStmts(nodep->initsp());
searchFuncStmts(nodep->stmtsp());
searchFuncStmts(nodep->finalsp());
iterateChildren(nodep);
}
}
void searchFuncStmts(AstNode* nodep) {
// Search for basic assignments to allow moving non-blocktemps