Fix imports causing symbol table error, bug490.

This commit is contained in:
Wilson Snyder
2012-04-24 21:21:26 -04:00
parent fb90e47e70
commit f3867d7f80
5 changed files with 58 additions and 6 deletions
+7
View File
@@ -176,6 +176,13 @@ private:
m_modp = NULL;
}
virtual void visit(AstPackageImport* nodep, AstNUser*) {
// Package Import: We need to do the package before the use of a package
nodep->iterateChildren(*this);
if (!nodep->packagep()) nodep->v3fatalSrc("Unlinked package"); // Parser should set packagep
new V3GraphEdge(&m_graph, vertex(m_modp), vertex(nodep->packagep()), 1, false);
}
virtual void visit(AstCell* nodep, AstNUser*) {
// Cell: Resolve its filename. If necessary, parse it.
if (!nodep->modp()) {