[compiler-rt] r184555 - [lsan] Fix win build.
Sergey Matveev
earthdok at google.com
Fri Jun 21 08:14:57 PDT 2013
Author: smatveev
Date: Fri Jun 21 10:14:57 2013
New Revision: 184555
URL: http://llvm.org/viewvc/llvm-project?rev=184555&view=rev
Log:
[lsan] Fix win build.
Modified:
compiler-rt/trunk/lib/lsan/lsan_common.cc
Modified: compiler-rt/trunk/lib/lsan/lsan_common.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/lsan_common.cc?rev=184555&r1=184554&r2=184555&view=diff
==============================================================================
--- compiler-rt/trunk/lib/lsan/lsan_common.cc (original)
+++ compiler-rt/trunk/lib/lsan/lsan_common.cc Fri Jun 21 10:14:57 2013
@@ -20,14 +20,13 @@
#include "sanitizer_common/sanitizer_stacktrace.h"
#include "sanitizer_common/sanitizer_stoptheworld.h"
-#if CAN_SANITIZE_LEAKS
namespace __lsan {
+#if CAN_SANITIZE_LEAKS
// This mutex is used to prevent races between DoLeakCheck and SuppressObject.
BlockingMutex global_mutex(LINKER_INITIALIZED);
THREADLOCAL int disable_counter;
-bool DisabledInThisThread() { return disable_counter > 0; }
Flags lsan_flags;
@@ -401,9 +400,15 @@ void LeakReport::PrintSummary() {
"SUMMARY: LeakSanitizer: %zu byte(s) leaked in %zu allocation(s).\n\n",
bytes, allocations);
}
+#endif // CAN_SANITIZE_LEAKS
+bool DisabledInThisThread() {
+#ifdef CAN_SANITIZE_LEAKS
+ return disable_counter > 0;
+#endif
+ return false;
+}
} // namespace __lsan
-#endif // CAN_SANITIZE_LEAKS
using namespace __lsan; // NOLINT
More information about the llvm-commits
mailing list