Fix duplicate typedefs in generate for, #2205.

This commit is contained in:
Wilson Snyder
2020-03-26 18:10:20 -04:00
parent 590b1853d0
commit 4145a38c47
4 changed files with 55 additions and 0 deletions
+12
View File
@@ -167,6 +167,18 @@ private:
else m_modp->addStmtp(nodep);
}
}
virtual void visit(AstTypedef* nodep) VL_OVERRIDE {
if (m_unnamedScope != "") {
// Rename it
nodep->name(m_unnamedScope + "__DOT__" + nodep->name());
m_statep->userMarkChanged(nodep);
// Move to module
nodep->unlinkFrBack();
// Begins under funcs just move into the func
if (m_ftaskp) m_ftaskp->addStmtsp(nodep);
else m_modp->addStmtp(nodep);
}
}
virtual void visit(AstCell* nodep) VL_OVERRIDE {
UINFO(8," CELL "<<nodep<<endl);
if (m_namedScope != "") {