[compiler-rt] r252874 - tsan: fix mac Go build
Dmitry Vyukov via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 12 03:12:18 PST 2015
Author: dvyukov
Date: Thu Nov 12 05:12:18 2015
New Revision: 252874
URL: http://llvm.org/viewvc/llvm-project?rev=252874&view=rev
Log:
tsan: fix mac Go build
cur_thread does not exist in Go.
Modified:
compiler-rt/trunk/lib/tsan/rtl/tsan_platform_mac.cc
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_platform_mac.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_platform_mac.cc?rev=252874&r1=252873&r2=252874&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_platform_mac.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_platform_mac.cc Thu Nov 12 05:12:18 2015
@@ -110,7 +110,6 @@ void WriteMemoryProfile(char *buf, uptr
#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_hoo
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
More information about the llvm-commits
mailing list