[llvm-commits] [compiler-rt] r167450 - /compiler-rt/trunk/lib/sanitizer_common/sanitizer_internal_defs.h
Dmitry Vyukov
dvyukov at google.com
Tue Nov 6 04:54:16 PST 2012
Author: dvyukov
Date: Tue Nov 6 06:54:16 2012
New Revision: 167450
URL: http://llvm.org/viewvc/llvm-project?rev=167450&view=rev
Log:
tsan: define missing compier macros for windows
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_internal_defs.h
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_internal_defs.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_internal_defs.h?rev=167450&r1=167449&r2=167450&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_internal_defs.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_internal_defs.h Tue Nov 6 06:54:16 2012
@@ -34,6 +34,10 @@
# define NORETURN __declspec(noreturn)
# define THREADLOCAL __declspec(thread)
# define NOTHROW
+# define LIKELY(x) (x)
+# define UNLIKELY(x) (x)
+# define UNUSED
+# define USED
#else // _MSC_VER
# define ALWAYS_INLINE __attribute__((always_inline))
# define ALIAS(x) __attribute__((alias(x)))
@@ -43,16 +47,11 @@
# define NORETURN __attribute__((noreturn))
# define THREADLOCAL __thread
# define NOTHROW throw()
-#endif
-#endif // _MSC_VER
-
-// We have no equivalent of these on Windows.
-#ifndef _WIN32
# define LIKELY(x) __builtin_expect(!!(x), 1)
# define UNLIKELY(x) __builtin_expect(!!(x), 0)
# define UNUSED __attribute__((unused))
# define USED __attribute__((used))
-#endif
+#endif // _MSC_VER
#if defined(_WIN32)
typedef unsigned long DWORD; // NOLINT
More information about the llvm-commits
mailing list