[compiler-rt] r192569 - tsan: allow to override OnFinalize() in front-ends that does not support weak functions (Go)

Dmitry Vyukov dvyukov at google.com
Sun Oct 13 23:31:03 PDT 2013


Author: dvyukov
Date: Mon Oct 14 01:31:03 2013
New Revision: 192569

URL: http://llvm.org/viewvc/llvm-project?rev=192569&view=rev
Log:
tsan: allow to override OnFinalize() in front-ends that does not support weak functions (Go)


Modified:
    compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc

Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc?rev=192569&r1=192568&r2=192569&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc Mon Oct 14 01:31:03 2013
@@ -39,9 +39,13 @@ THREADLOCAL char cur_thread_placeholder[
 static char ctx_placeholder[sizeof(Context)] ALIGNED(64);
 
 // Can be overriden by a front-end.
-bool CPP_WEAK OnFinalize(bool failed) {
+#ifdef TSAN_EXTERNAL_HOOKS
+bool OnFinalize(bool failed);
+#else
+bool WEAK OnFinalize(bool failed) {
   return failed;
 }
+#endif
 
 static Context *ctx;
 Context *CTX() {





More information about the llvm-commits mailing list