summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2017-03-15 23:53:12 +0000
committerKostya Serebryany <kcc@google.com>2017-03-15 23:53:12 +0000
commitec3ceb1ce5b1ebed5d273422c4cb88deb9486ae3 (patch)
tree15fecb110a2de67c69bf89a087793ae1c2181054
parente54a592aee4c2760a9f5bc4dab5df801536cc334 (diff)
downloadbcm5719-llvm-ec3ceb1ce5b1ebed5d273422c4cb88deb9486ae3.tar.gz
bcm5719-llvm-ec3ceb1ce5b1ebed5d273422c4cb88deb9486ae3.zip
[asan] trying to fix the windows build
llvm-svn: 297918
-rw-r--r--compiler-rt/lib/asan/asan_memory_profile.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler-rt/lib/asan/asan_memory_profile.cc b/compiler-rt/lib/asan/asan_memory_profile.cc
index e07f4514410..05846c37cb6 100644
--- a/compiler-rt/lib/asan/asan_memory_profile.cc
+++ b/compiler-rt/lib/asan/asan_memory_profile.cc
@@ -111,15 +111,17 @@ static void MemoryProfileCB(const SuspendedThreadsList &suspended_threads_list,
} // namespace __asan
+#endif // CAN_SANITIZE_LEAKS
+
extern "C" {
SANITIZER_INTERFACE_ATTRIBUTE
void __sanitizer_print_memory_profile(uptr top_percent,
uptr max_number_of_contexts) {
+#if CAN_SANITIZE_LEAKS
uptr Arg[2];
Arg[0] = top_percent;
Arg[1] = max_number_of_contexts;
__sanitizer::StopTheWorld(__asan::MemoryProfileCB, Arg);
+#endif // CAN_SANITIZE_LEAKS
}
} // extern "C"
-
-#endif // CAN_SANITIZE_LEAKS
OpenPOWER on IntegriCloud