diff --git a/src/V3Link.cpp b/src/V3Link.cpp index c645b801d..190fbb6e3 100644 --- a/src/V3Link.cpp +++ b/src/V3Link.cpp @@ -541,12 +541,6 @@ private: findAndInsertAndCheck(nodep, nodep->name()); } } - virtual void visit(AstTypedefFwd* nodep, AstNUser*) { - // We only needed the forward declaration in order to parse correctly. - // We won't even check it was ever really defined, as it might have been in a header - // file referring to a module we never needed - nodep->unlinkFrBack()->deleteTree(); - } virtual void visit(AstRefDType* nodep, AstNUser*) { // Resolve its reference if (m_idState==ID_RESOLVE && !nodep->defp()) { diff --git a/src/V3LinkParse.cpp b/src/V3LinkParse.cpp index 6bbf317e0..d53f3d8ea 100644 --- a/src/V3LinkParse.cpp +++ b/src/V3LinkParse.cpp @@ -382,6 +382,13 @@ private: nodep->deleteTree(); nodep=NULL; } + virtual void visit(AstTypedefFwd* nodep, AstNUser*) { + // We only needed the forward declaration in order to parse correctly. + // We won't even check it was ever really defined, as it might have been in a header + // file referring to a module we never needed + nodep->unlinkFrBack()->deleteTree(); + } + virtual void visit(AstNode* nodep, AstNUser*) { // Default: Just iterate cleanFileline(nodep);