diff --git a/src/V3CCtors.h b/src/V3CCtors.h index 47bba3f8e..68a95d511 100644 --- a/src/V3CCtors.h +++ b/src/V3CCtors.h @@ -32,9 +32,9 @@ class V3CCtors { public: static void cctorsAll(); + private: static void evalAsserts(); }; - #endif // Guard diff --git a/src/V3Config.h b/src/V3Config.h index cdd4b9c78..e1b9a2cb7 100644 --- a/src/V3Config.h +++ b/src/V3Config.h @@ -39,7 +39,8 @@ public: static void addIgnore(V3ErrorCode code, bool on, const string& filename, int min, int max); static void addWaiver(V3ErrorCode code, const string& filename, const string& msg); static void addInline(FileLine* fl, const string& module, const string& ftask, bool on); - static void addVarAttr(FileLine* fl, const string& module, const string& ftask, const string& signal, AstAttrType type, AstSenTree* nodep); + static void addVarAttr(FileLine* fl, const string& module, const string& ftask, + const string& signal, AstAttrType type, AstSenTree* nodep); static void applyCase(AstCase* nodep); static void applyCoverageBlock(AstNodeModule* modulep, AstBegin* nodep); static void applyIgnores(FileLine* filelinep); diff --git a/src/V3GraphAlg.h b/src/V3GraphAlg.h index 78aeeda31..4a44b4c24 100644 --- a/src/V3GraphAlg.h +++ b/src/V3GraphAlg.h @@ -38,7 +38,8 @@ protected: V3EdgeFuncP m_edgeFuncp; // Function that says we follow this edge // CONSTRUCTORS GraphAlg(T_Graph* graphp, V3EdgeFuncP edgeFuncp) - : m_graphp(graphp), m_edgeFuncp(edgeFuncp) {} + : m_graphp(graphp) + , m_edgeFuncp(edgeFuncp) {} ~GraphAlg() {} // METHODS inline bool followEdge(V3GraphEdge* edgep) { diff --git a/src/V3GraphPathChecker.h b/src/V3GraphPathChecker.h index 7b6024eee..958861b62 100644 --- a/src/V3GraphPathChecker.h +++ b/src/V3GraphPathChecker.h @@ -40,7 +40,7 @@ class GraphPathChecker : GraphAlg { // through the same node twice while searching for a path. vluint64_t m_generation; - public: +public: // CONSTRUCTORS explicit GraphPathChecker(const V3Graph* graphp, V3EdgeFuncP edgeFuncp = V3GraphEdge::followAlwaysTrue); @@ -54,9 +54,8 @@ class GraphPathChecker : GraphAlg { // removed. Detect such an edge. bool isTransitiveEdge(const V3GraphEdge* edgep); - private: - bool pathExistsInternal(const V3GraphVertex* ap, - const V3GraphVertex* bp, +private: + bool pathExistsInternal(const V3GraphVertex* ap, const V3GraphVertex* bp, unsigned* costp = NULL); void initHalfCriticalPaths(GraphWay way, bool checkOnly); void incGeneration() { ++m_generation; } diff --git a/src/V3LinkLevel.h b/src/V3LinkLevel.h index 64b9b3bd8..b1cf94281 100644 --- a/src/V3LinkLevel.h +++ b/src/V3LinkLevel.h @@ -33,6 +33,7 @@ class V3LinkLevel { private: static void wrapTopCell(AstNetlist* rootp); static void wrapTopPackages(AstNetlist* rootp); + public: static void modSortByLevel(); static void wrapTop(AstNetlist* rootp); diff --git a/src/V3Parse.h b/src/V3Parse.h index 767649185..560b2c9a9 100644 --- a/src/V3Parse.h +++ b/src/V3Parse.h @@ -40,6 +40,7 @@ private: // CONSTRUCTORS VL_UNCOPYABLE(V3Parse); + public: // We must allow reading multiple files into one parser V3Parse(AstNetlist* rootp, VInFilter* filterp, V3ParseSym* symp); diff --git a/src/VlcBucket.h b/src/VlcBucket.h index 10881eb75..c7405a6c0 100644 --- a/src/VlcBucket.h +++ b/src/VlcBucket.h @@ -37,17 +37,22 @@ private: vluint64_t m_bucketsCovered; ///< Num buckets with sufficient coverage private: - static inline vluint64_t covBit(vluint64_t point) { return 1ULL<<(point & 63); } + static inline vluint64_t covBit(vluint64_t point) { return 1ULL << (point & 63); } inline vluint64_t allocSize() const { return sizeof(vluint64_t) * m_dataSize / 64; } void allocate(vluint64_t point) { vluint64_t oldsize = m_dataSize; - if (m_dataSize= sufficient()) { - //UINFO(9," addData "< NameMap; // Sorted by name (ordered) + typedef std::map NameMap; // Sorted by name (ordered) NameMap m_nameMap; //< Name to point-number std::vector m_points; //< List of all points vluint64_t m_numPoints; //< Total unique points @@ -114,33 +114,28 @@ public: public: // CONSTRUCTORS - VlcPoints() { - m_numPoints = 0; - } + VlcPoints() : m_numPoints(0) {} ~VlcPoints() {} // METHODS void dump() { - UINFO(2,"dumpPoints...\n"); + UINFO(2, "dumpPoints...\n"); VlcPoint::dumpHeader(); for (VlcPoints::ByName::const_iterator it = begin(); it != end(); ++it) { const VlcPoint& point = pointNumber(it->second); point.dump(); } } - VlcPoint& pointNumber(vluint64_t num) { - return m_points[num]; - } + VlcPoint& pointNumber(vluint64_t num) { return m_points[num]; } vluint64_t findAddPoint(const string& name, vluint64_t count) { vluint64_t pointnum; NameMap::const_iterator iter = m_nameMap.find(name); if (iter != m_nameMap.end()) { pointnum = iter->second; m_points[pointnum].countInc(count); - } - else { + } else { pointnum = m_numPoints++; - VlcPoint point (name, pointnum); + VlcPoint point(name, pointnum); point.countInc(count); m_points.push_back(point); m_nameMap.insert(make_pair(point.name(), point.pointNum())); diff --git a/src/VlcTest.h b/src/VlcTest.h index 89ab1ead5..2bdeb7768 100644 --- a/src/VlcTest.h +++ b/src/VlcTest.h @@ -71,19 +71,20 @@ public: // METHODS static void dumpHeader() { - cout<<"Tests:\n"; - //cout<<" Testrun, Computrons,"; // Currently not loaded - cout<<" Covered, Rank, RankPts, Filename"< ByName; + private: // MEMBERS ByName m_tests; //< List of all tests @@ -109,14 +111,14 @@ public: // CONSTRUCTORS VlcTests() {} ~VlcTests() { - for (VlcTests::ByName::iterator it=begin(); it!=end(); ++it) { - VL_DO_CLEAR(delete *it, *it=NULL); + for (VlcTests::ByName::iterator it = begin(); it != end(); ++it) { + VL_DO_CLEAR(delete *it, *it = NULL); } } // METHODS void dump(bool bucketsToo) { - UINFO(2,"dumpTests...\n"); + UINFO(2, "dumpTests...\n"); VlcTest::dumpHeader(); for (VlcTests::ByName::const_iterator it = begin(); it != end(); ++it) { (*it)->dump(bucketsToo); diff --git a/src/VlcTop.h b/src/VlcTop.h index 6cb9303f9..2e9a41e56 100644 --- a/src/VlcTop.h +++ b/src/VlcTop.h @@ -60,7 +60,7 @@ public: // METHODS void annotate(const string& dirname); - void readCoverage(const string& filename, bool nonfatal=false); + void readCoverage(const string& filename, bool nonfatal = false); void writeCoverage(const string& filename); void rank();