summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--compiler-rt/lib/tsan/rtl/tsan_platform_mac.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler-rt/lib/tsan/rtl/tsan_platform_mac.cc b/compiler-rt/lib/tsan/rtl/tsan_platform_mac.cc
index 446d7900199..3c10c0b4de4 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_platform_mac.cc
+++ b/compiler-rt/lib/tsan/rtl/tsan_platform_mac.cc
@@ -110,7 +110,6 @@ void WriteMemoryProfile(char *buf, uptr buf_size, uptr nthread, uptr nlive) {
#ifndef SANITIZER_GO
void InitializeShadowMemoryPlatform() { }
-#endif
// On OS X, GCD worker threads are created without a call to pthread_create. We
// need to properly register these threads with ThreadCreate and ThreadStart.
@@ -148,6 +147,7 @@ static void my_pthread_introspection_hook(unsigned int event, pthread_t thread,
if (prev_pthread_introspection_hook != nullptr)
prev_pthread_introspection_hook(event, thread, addr, size);
}
+#endif
void InitializePlatform() {
DisableCoreDumperIfNecessary();
@@ -156,10 +156,10 @@ void InitializePlatform() {
CHECK_EQ(main_thread_identity, 0);
main_thread_identity = (uptr)pthread_self();
-#endif
prev_pthread_introspection_hook =
pthread_introspection_hook_install(&my_pthread_introspection_hook);
+#endif
}
#ifndef SANITIZER_GO
OpenPOWER on IntegriCloud