From 97963fb8c98432780e2af34013f4102841317763 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Wed, 13 Jun 2012 22:18:12 -0400 Subject: [PATCH] Internals: Move DECLFILENAME code to LinkCells. --- src/V3Link.cpp | 12 ------------ src/V3LinkCells.cpp | 10 ++++++++++ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/V3Link.cpp b/src/V3Link.cpp index 190fbb6e3..346c57829 100644 --- a/src/V3Link.cpp +++ b/src/V3Link.cpp @@ -82,7 +82,6 @@ private: bool m_inGenerate; // Inside a generate AstNodeModule* m_valueModp; // If set, move AstVar->valuep() initial values to this module vector m_delSymps; // Symbol tables to delete - set m_declfnWarned; // Files we issued DECLFILENAME on static int debug() { static int level = -1; @@ -230,17 +229,6 @@ private: virtual void visit(AstNodeModule* nodep, AstNUser*) { // Module: Create sim table for entire module and iterate UINFO(2,"Link Module: "<fileline()->filebasenameNoExt() != nodep->prettyName() - && !v3Global.opt.isLibraryFile(nodep->fileline()->filename())) { - // We only complain once per file, otherwise library-like files have a huge mess of warnings - if (m_declfnWarned.find(nodep->fileline()->filename()) == m_declfnWarned.end()) { - m_declfnWarned.insert(nodep->fileline()->filename()); - nodep->v3warn(DECLFILENAME, "Filename '"<fileline()->filebasenameNoExt() - <<"' does not match "<typeName()<<" name: "<prettyName()); - } - } - } AstCell* upperCellp = m_cellp; V3SymTable* upperVarsp = m_curVarsp; { diff --git a/src/V3LinkCells.cpp b/src/V3LinkCells.cpp index 753d17bb4..36a29892e 100644 --- a/src/V3LinkCells.cpp +++ b/src/V3LinkCells.cpp @@ -103,6 +103,7 @@ private: LinkCellsGraph m_graph; // Linked graph of all cell interconnects LibraryVertex* m_libVertexp; // Vertex at root of all libraries V3GraphVertex* m_topVertexp; // Vertex of top module + set m_declfnWarned; // Files we issued DECLFILENAME on static int debug() { static int level = -1; @@ -155,6 +156,15 @@ private: // Module: Pick up modnames, so we can resolve cells later m_modp = nodep; UINFO(2,"Link Module: "<fileline()->filebasenameNoExt() != nodep->prettyName() + && !v3Global.opt.isLibraryFile(nodep->fileline()->filename())) { + // We only complain once per file, otherwise library-like files have a huge mess of warnings + if (m_declfnWarned.find(nodep->fileline()->filename()) == m_declfnWarned.end()) { + m_declfnWarned.insert(nodep->fileline()->filename()); + nodep->v3warn(DECLFILENAME, "Filename '"<fileline()->filebasenameNoExt() + <<"' does not match "<typeName()<<" name: "<prettyName()); + } + } bool topMatch = (v3Global.opt.topModule()==nodep->name()); if (topMatch) { m_topVertexp = vertex(nodep);