mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-17 13:22:03 +01:00
Merge 54e6eacc1fccd602897d9e3025c62f83194ffd5b into 5f4422d68dc3530c353af1f87499de1c864b60ad
This commit is contained in:
commit
ffe5eeafb4
@ -4,19 +4,18 @@
|
|||||||
|
|
||||||
#include <test/util/coverage.h>
|
#include <test/util/coverage.h>
|
||||||
|
|
||||||
#if defined(__clang__) && defined(__linux__)
|
#if defined(__clang__)
|
||||||
extern "C" void __llvm_profile_reset_counters(void) __attribute__((weak));
|
extern "C" __attribute__((weak)) void __llvm_profile_reset_counters(void);
|
||||||
extern "C" void __gcov_reset(void) __attribute__((weak));
|
extern "C" __attribute__((weak)) void __gcov_reset(void);
|
||||||
|
|
||||||
void ResetCoverageCounters()
|
// Fallback implementations
|
||||||
{
|
extern "C" __attribute__((weak)) void __llvm_profile_reset_counters(void) {}
|
||||||
if (__llvm_profile_reset_counters) {
|
extern "C" __attribute__((weak)) void __gcov_reset(void) {}
|
||||||
__llvm_profile_reset_counters();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (__gcov_reset) {
|
void ResetCoverageCounters() {
|
||||||
__gcov_reset();
|
// These will call the real ones if available, or our dummies if not
|
||||||
}
|
__llvm_profile_reset_counters();
|
||||||
|
__gcov_reset();
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
void ResetCoverageCounters() {}
|
void ResetCoverageCounters() {}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user