diff options
author | Dmitry Vyukov <dvyukov@google.com> | 2015-11-12 11:12:18 +0000 |
---|---|---|
committer | Dmitry Vyukov <dvyukov@google.com> | 2015-11-12 11:12:18 +0000 |
commit | 1421ed42a63a1c15470df5f7da09e254e8660f23 (patch) | |
tree | 17831e019abfb277d0c4c3be5185d8a75935e41e | |
parent | 14fb164a8e0fa3a7561d2d088b4355c4eb38ba78 (diff) | |
download | bcm5719-llvm-1421ed42a63a1c15470df5f7da09e254e8660f23.tar.gz bcm5719-llvm-1421ed42a63a1c15470df5f7da09e254e8660f23.zip |
tsan: fix mac Go build
cur_thread does not exist in Go.
llvm-svn: 252874
-rw-r--r-- | compiler-rt/lib/tsan/rtl/tsan_platform_mac.cc | 4 |
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 |