diff options
author | Dmitry Vyukov <dvyukov@google.com> | 2012-11-06 12:54:16 +0000 |
---|---|---|
committer | Dmitry Vyukov <dvyukov@google.com> | 2012-11-06 12:54:16 +0000 |
commit | e2462f7461961925f7f20577352c01e867365d8b (patch) | |
tree | 1ed5287483913e057d21a895c82adbffee2dcb72 | |
parent | bb19294a1195fb320047bace7732f15e85ac4da5 (diff) | |
download | compiler-rt-e2462f7461961925f7f20577352c01e867365d8b.tar.gz |
tsan: define missing compier macros for windows
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@167450 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/sanitizer_common/sanitizer_internal_defs.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/sanitizer_common/sanitizer_internal_defs.h b/lib/sanitizer_common/sanitizer_internal_defs.h index d52d1a83b..09c6f9702 100644 --- a/lib/sanitizer_common/sanitizer_internal_defs.h +++ b/lib/sanitizer_common/sanitizer_internal_defs.h @@ -34,6 +34,10 @@ using namespace __sanitizer; // NOLINT # 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 @@ using namespace __sanitizer; // NOLINT # 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 |