Replace __gcov_flush with __gcov_dump
__gcov_flush was a private function and was removed from later GCC versions (at least from 11.2.0, possibly earlier). Replace with the documented public __gcov_dump.
This commit is contained in:
parent
b9d7819faa
commit
38e5b6c1ad
|
|
@ -2809,7 +2809,7 @@ void Verilated::runFlushCallbacks() VL_MT_SAFE {
|
|||
// When running internal code coverage (gcc --coverage, as opposed to
|
||||
// verilator --coverage), dump coverage data to properly cover failing
|
||||
// tests.
|
||||
VL_GCOV_FLUSH();
|
||||
VL_GCOV_DUMP();
|
||||
}
|
||||
|
||||
void Verilated::addExitCb(VoidPCb cb, void* datap) VL_MT_SAFE {
|
||||
|
|
|
|||
|
|
@ -255,14 +255,11 @@
|
|||
// Internal coverage
|
||||
|
||||
#ifdef VL_GCOV
|
||||
extern "C" {
|
||||
void __gcov_flush(); // gcc sources gcc/gcov-io.h has the prototype
|
||||
}
|
||||
// Flush internal code coverage data before e.g. std::abort()
|
||||
# define VL_GCOV_FLUSH() \
|
||||
__gcov_flush()
|
||||
extern "C" void __gcov_dump();
|
||||
// Dump internal code coverage data before e.g. std::abort()
|
||||
# define VL_GCOV_DUMP() __gcov_dump()
|
||||
#else
|
||||
# define VL_GCOV_FLUSH()
|
||||
# define VL_GCOV_DUMP()
|
||||
#endif
|
||||
|
||||
//=========================================================================
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ void V3Error::vlAbortOrExit() {
|
|||
}
|
||||
|
||||
void V3Error::vlAbort() {
|
||||
VL_GCOV_FLUSH();
|
||||
VL_GCOV_DUMP();
|
||||
std::abort();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue