Internals: Remove typedefFwd earlier to simplify Link

This commit is contained in:
Wilson Snyder 2012-05-28 10:23:47 -04:00
parent 429437f1b9
commit d34fccec22
2 changed files with 7 additions and 6 deletions

View File

@ -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()) {

View File

@ -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);