Internal coverage: Fix coverage of tests that abort. No functional change intended.

This commit is contained in:
Wilson Snyder
2020-06-05 08:00:22 -04:00
parent 5a622fd9db
commit c5d61da5d2
5 changed files with 31 additions and 20 deletions
+8 -3
View File
@@ -156,15 +156,20 @@ string V3Error::msgPrefix() {
//======================================================================
// Abort/exit
void V3Error::vlAbort() {
void V3Error::vlAbortOrExit() {
if (V3Error::debugDefault()) {
std::cerr << msgPrefix() << "Aborting since under --debug" << endl;
abort();
V3Error::vlAbort();
} else {
exit(1);
}
}
void V3Error::vlAbort() {
VL_GCOV_FLUSH();
abort();
}
//======================================================================
// Global Functions
@@ -272,7 +277,7 @@ void V3Error::v3errorEnd(std::ostringstream& sstr, const string& locationStr) {
#endif
}
vlAbort();
vlAbortOrExit();
} else if (isError(s_errorCode, s_errorSuppressed)) {
// We don't dump tree on any error because a Visitor may be in middle of
// a tree cleanup and cause a false broken problem.