Add public enums, bug833.

This commit is contained in:
Wilson Snyder
2014-11-07 07:50:11 -05:00
parent e9c46afcf7
commit 3f82fd2f37
13 changed files with 207 additions and 7 deletions
+7
View File
@@ -165,6 +165,13 @@ private:
nodep->packagep()->user1Inc();
}
}
virtual void visit(AstTypedef* nodep, AstNUser*) {
nodep->iterateChildren(*this);
checkAll(nodep);
// Don't let packages with only public variables disappear
// Normal modules may disappear, e.g. if they are parameterized then removed
if (nodep->attrPublic() && m_modp && m_modp->castPackage()) m_modp->user1Inc();
}
virtual void visit(AstVarScope* nodep, AstNUser*) {
nodep->iterateChildren(*this);
checkAll(nodep);