From cc134b38eef1c2bb9611caa2698aa3bb30e2a114 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Mon, 7 Sep 2020 13:11:44 -0400 Subject: [PATCH] Internal coverage: Misc cleanups --- nodist/code_coverage.dat | 2 ++ src/V3Options.cpp | 13 ++----------- src/V3Options.h | 1 - 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/nodist/code_coverage.dat b/nodist/code_coverage.dat index 3e298fd4f..fc3beb3ee 100644 --- a/nodist/code_coverage.dat +++ b/nodist/code_coverage.dat @@ -48,12 +48,14 @@ exclude_line_regexp(qr/(\bv3fatalSrc\b |\bVL_UNCOVERABLE\b |\bVL_FATAL |\bUASSERT + |\bNUM_ASSERT |\bERROR_RSVD_WORD |\bV3ERROR_NA |\bUINFO\b)/x); # Exclude for branch coverage only exclude_branch_regexp(qr/(\bdebug\(\) + |\bassert\( |\bSELF_CHECK)/x); 1; diff --git a/src/V3Options.cpp b/src/V3Options.cpp index e8ffdb6f5..3b2aabde7 100644 --- a/src/V3Options.cpp +++ b/src/V3Options.cpp @@ -431,15 +431,6 @@ string V3Options::allArgsStringForHierBlock(bool forTop) const { //###################################################################### // File searching -bool V3Options::fileStatDir(const string& filename) { - // NOLINTNEXTLINE(cppcoreguidelines-pro-type-member-init) - struct stat sstat; // Stat information - int err = stat(filename.c_str(), &sstat); - if (err != 0) return false; - if (!S_ISDIR(sstat.st_mode)) return false; - return true; -} - bool V3Options::fileStatNormal(const string& filename) { // NOLINTNEXTLINE(cppcoreguidelines-pro-type-member-init) struct stat sstat; // Stat information @@ -651,9 +642,9 @@ string V3Options::getenvSYSTEMC_ARCH() { struct utsname uts; uname(&uts); string sysname = VString::downcase(uts.sysname); // aka 'uname -s' - if (VString::wildmatch(sysname.c_str(), "*solaris*")) { + if (VL_UNCOVERABLE(VString::wildmatch(sysname.c_str(), "*solaris*"))) { var = "gccsparcOS5"; - } else if (VString::wildmatch(sysname.c_str(), "*cygwin*")) { + } else if (VL_UNCOVERABLE(VString::wildmatch(sysname.c_str(), "*cygwin*"))) { var = "cygwin"; } else { var = "linux"; diff --git a/src/V3Options.h b/src/V3Options.h index 9ea261521..f5d21aac3 100644 --- a/src/V3Options.h +++ b/src/V3Options.h @@ -671,7 +671,6 @@ public: const string& errmsg); void filePathLookedMsg(FileLine* fl, const string& modname); V3LangCode fileLanguage(const string& filename); - static bool fileStatDir(const string& filename); static bool fileStatNormal(const string& filename); static void fileNfsFlush(const string& filename);