summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cc
diff options
context:
space:
mode:
authorAlexey Samsonov <vonosmas@gmail.com>2015-02-17 23:23:10 +0000
committerAlexey Samsonov <vonosmas@gmail.com>2015-02-17 23:23:10 +0000
commite194dfa6be88729d7de7f1fee77072eb55b55e77 (patch)
tree2165edd4671713fc9613501e806fa641d02f0217 /compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cc
parent8c77768609010c760c266f5ee7c753e4158ed037 (diff)
downloadbcm5719-llvm-e194dfa6be88729d7de7f1fee77072eb55b55e77.tar.gz
bcm5719-llvm-e194dfa6be88729d7de7f1fee77072eb55b55e77.zip
[TSan] Provide default values for compile definitions.
Provide defaults for TSAN_COLLECT_STATS and TSAN_NO_HISTORY. Replace #ifdef directives with #if. This fixes a bug introduced in r229112, where building TSan runtime with -DTSAN_COLLECT_STATS=0 would still enable stats collection and reporting. llvm-svn: 229581
Diffstat (limited to 'compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cc')
-rw-r--r--compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cc b/compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cc
index 3ca9793e699..8ed1fbf2eda 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cc
+++ b/compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cc
@@ -145,7 +145,7 @@ void ThreadContext::OnFinished() {
AllocatorThreadFinish(thr);
#endif
thr->~ThreadState();
-#ifdef TSAN_COLLECT_STATS
+#if TSAN_COLLECT_STATS
StatAggregate(ctx->stat, thr->stat);
#endif
thr = 0;
OpenPOWER on IntegriCloud