summaryrefslogtreecommitdiff
path: root/toolchain-extras/profile-clang-extras.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'toolchain-extras/profile-clang-extras.cpp')
-rw-r--r--toolchain-extras/profile-clang-extras.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/toolchain-extras/profile-clang-extras.cpp b/toolchain-extras/profile-clang-extras.cpp
index c45f9b39..6a7766ef 100644
--- a/toolchain-extras/profile-clang-extras.cpp
+++ b/toolchain-extras/profile-clang-extras.cpp
@@ -24,10 +24,16 @@ extern "C" {
static sighandler_t chained_signal_handler = SIG_ERR;
+#ifndef __CONTINUOUS_COVERAGE_MODE__
int __llvm_profile_write_file(void);
+#endif // __CONTINUOUS_COVERAGE_MODE__
static void llvm_signal_handler(__unused int signum) {
+ // TODO(pirama) Only disable __llvm_profile_write_file call to begin with.
+ // After continuous mode is stable, stop registering the signal handler.
+#ifndef __CONTINUOUS_COVERAGE_MODE__
__llvm_profile_write_file();
+#endif // __CONTINUOUS_COVERAGE_MODE__
if (chained_signal_handler != SIG_ERR && chained_signal_handler != SIG_IGN &&
chained_signal_handler != SIG_DFL) {