From d34fccec22c81a48cab12182686df1faafb9d4e0 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Mon, 28 May 2012 10:23:47 -0400 Subject: [PATCH] Internals: Remove typedefFwd earlier to simplify Link --- src/V3Link.cpp | 6 ------ src/V3LinkParse.cpp | 7 +++++++ 2 files changed, 7 insertions(+), 6 deletions(-) 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);