mirror of
https://github.com/verilator/verilator.git
synced 2025-04-25 10:06:54 +00:00
Internals: Route abort() through vlabort(). No functional change
This commit is contained in:
parent
03c5d06107
commit
4f2dc0ecff
@ -303,6 +303,18 @@ string V3Error::msgPrefix(V3ErrorCode code) {
|
||||
else return "%Warning-"+(string)code.ascii()+": ";
|
||||
}
|
||||
|
||||
//======================================================================
|
||||
// Abort/exit
|
||||
|
||||
void V3Error::vlAbort () {
|
||||
if (V3Error::debugDefault()) {
|
||||
cerr<<msgPrefix()<<"Aborting since under --debug"<<endl;
|
||||
abort();
|
||||
} else {
|
||||
exit(10);
|
||||
}
|
||||
}
|
||||
|
||||
//======================================================================
|
||||
// Global Functions
|
||||
|
||||
@ -325,10 +337,6 @@ void V3Error::suppressThisWarning() {
|
||||
}
|
||||
}
|
||||
|
||||
void V3Error::v3abort () {
|
||||
v3fatalSrc("v3abort called\n");
|
||||
}
|
||||
|
||||
void V3Error::v3errorEnd (ostringstream& sstr) {
|
||||
#ifdef __COVERITY__
|
||||
if (s_errorCode==V3ErrorCode::FATAL) __coverity_panic__(x);
|
||||
@ -385,12 +393,7 @@ void V3Error::v3errorEnd (ostringstream& sstr) {
|
||||
#endif
|
||||
}
|
||||
|
||||
if (V3Error::debugDefault()) {
|
||||
cerr<<msgPrefix()<<"Aborting since under --debug"<<endl;
|
||||
abort();
|
||||
} else {
|
||||
exit(10);
|
||||
}
|
||||
vlAbort();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -172,7 +172,7 @@ class V3Error {
|
||||
static ostringstream& v3errorPrep (V3ErrorCode code) {
|
||||
s_errorStr.str(""); s_errorCode=code; return s_errorStr; }
|
||||
static ostringstream& v3errorStr () { return s_errorStr; }
|
||||
static void v3abort();
|
||||
static void vlAbort();
|
||||
static void v3errorEnd(ostringstream& sstr); // static, but often overridden in classes.
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user