From 95eaa216379eea52ca12bebf29ab6e052a2e3a72 Mon Sep 17 00:00:00 2001 From: Evgeniy Stepanov Date: Tue, 19 Mar 2013 14:54:17 +0000 Subject: [PATCH] [sanitizer] More renamed macros. llvm-svn: 177401 --- compiler-rt/lib/asan/asan_internal.h | 2 +- compiler-rt/lib/asan/asan_mac.cc | 2 +- compiler-rt/lib/asan/asan_malloc_mac.cc | 2 +- compiler-rt/lib/asan/asan_malloc_win.cc | 2 +- compiler-rt/lib/asan/asan_win.cc | 2 +- .../lib/sanitizer_common/sanitizer_common_interceptors.inc | 2 +- compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h | 8 ++++---- compiler-rt/lib/sanitizer_common/sanitizer_procmaps.h | 2 +- compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_mac.cc | 2 +- compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_win.cc | 2 +- compiler-rt/lib/tsan/go/tsan_go.cc | 2 +- compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc | 2 +- compiler-rt/lib/tsan/rtl/tsan_platform_mac.cc | 4 ++-- compiler-rt/lib/tsan/rtl/tsan_platform_windows.cc | 4 ++-- 14 files changed, 19 insertions(+), 19 deletions(-) diff --git a/compiler-rt/lib/asan/asan_internal.h b/compiler-rt/lib/asan/asan_internal.h index ab12831..dc8ad19 100644 --- a/compiler-rt/lib/asan/asan_internal.h +++ b/compiler-rt/lib/asan/asan_internal.h @@ -111,7 +111,7 @@ void PoisonShadowPartialRightRedzone(uptr addr, u8 value); // Platfrom-specific options. -#ifdef __APPLE__ +#if SANITIZER_MAC bool PlatformHasDifferentMemcpyAndMemmove(); # define PLATFORM_HAS_DIFFERENT_MEMCPY_AND_MEMMOVE \ (PlatformHasDifferentMemcpyAndMemmove()) diff --git a/compiler-rt/lib/asan/asan_mac.cc b/compiler-rt/lib/asan/asan_mac.cc index 49def16..80dc0f6 100644 --- a/compiler-rt/lib/asan/asan_mac.cc +++ b/compiler-rt/lib/asan/asan_mac.cc @@ -13,7 +13,7 @@ //===----------------------------------------------------------------------===// #include "sanitizer_common/sanitizer_platform.h" -#ifdef __APPLE__ +#if SANITIZER_MAC #include "asan_interceptors.h" #include "asan_internal.h" diff --git a/compiler-rt/lib/asan/asan_malloc_mac.cc b/compiler-rt/lib/asan/asan_malloc_mac.cc index b8e207f..618dd25 100644 --- a/compiler-rt/lib/asan/asan_malloc_mac.cc +++ b/compiler-rt/lib/asan/asan_malloc_mac.cc @@ -13,7 +13,7 @@ //===----------------------------------------------------------------------===// #include "sanitizer_common/sanitizer_platform.h" -#ifdef __APPLE__ +#if SANITIZER_MAC #include #include diff --git a/compiler-rt/lib/asan/asan_malloc_win.cc b/compiler-rt/lib/asan/asan_malloc_win.cc index 765fc78..31fb777 100644 --- a/compiler-rt/lib/asan/asan_malloc_win.cc +++ b/compiler-rt/lib/asan/asan_malloc_win.cc @@ -13,7 +13,7 @@ //===----------------------------------------------------------------------===// #include "sanitizer_common/sanitizer_platform.h" -#ifdef _WIN32 +#if SANITIZER_WINDOWS #include "asan_allocator.h" #include "asan_interceptors.h" diff --git a/compiler-rt/lib/asan/asan_win.cc b/compiler-rt/lib/asan/asan_win.cc index 82dba08..49a3899 100644 --- a/compiler-rt/lib/asan/asan_win.cc +++ b/compiler-rt/lib/asan/asan_win.cc @@ -13,7 +13,7 @@ //===----------------------------------------------------------------------===// #include "sanitizer_common/sanitizer_platform.h" -#ifdef _WIN32 +#if SANITIZER_WINDOWS #include #include diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc index 3cb1d4a..d6d09d2 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc @@ -24,7 +24,7 @@ #include -#ifdef _WIN32 +#if SANITIZER_WINDOWS #define va_copy(dst, src) ((dst) = (src)) #endif // _WIN32 diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h b/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h index 8922ef2..d1b819d 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h @@ -15,7 +15,7 @@ #include "sanitizer_platform.h" -#if defined(_WIN32) +#if SANITIZER_WINDOWS // FIXME find out what we need on Windows. __declspec(dllexport) ? # define SANITIZER_INTERFACE_ATTRIBUTE # define SANITIZER_WEAK_ATTRIBUTE @@ -27,7 +27,7 @@ # define SANITIZER_WEAK_ATTRIBUTE __attribute__((weak)) #endif -#ifdef __linux__ +#if SANITIZER_LINUX # define SANITIZER_SUPPORTS_WEAK_HOOKS 1 #else # define SANITIZER_SUPPORTS_WEAK_HOOKS 0 @@ -72,7 +72,7 @@ typedef int fd_t; // _FILE_OFFSET_BITS. This definition of OFF_T matches the ABI of system calls // like pread and mmap, as opposed to pread64 and mmap64. // Mac and Linux/x86-64 are special. -#if defined(__APPLE__) || (defined(__linux__) && defined(__x86_64__)) +#if SANITIZER_MAC || (SANITIZER_LINUX && defined(__x86_64__)) typedef u64 OFF_T; #else typedef uptr OFF_T; @@ -150,7 +150,7 @@ using namespace __sanitizer; // NOLINT # endif #endif // _MSC_VER -#if defined(_WIN32) +#if SANITIZER_WINDOWS typedef unsigned long DWORD; // NOLINT typedef DWORD thread_return_t; # define THREAD_CALLING_CONV __stdcall diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_procmaps.h b/compiler-rt/lib/sanitizer_common/sanitizer_procmaps.h index fad254d..2485478 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_procmaps.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_procmaps.h @@ -19,7 +19,7 @@ namespace __sanitizer { -#ifdef _WIN32 +#if SANITIZER_WINDOWS class MemoryMappingLayout { public: MemoryMappingLayout() {} diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_mac.cc b/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_mac.cc index 20f3b3b..84148f68 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_mac.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_mac.cc @@ -13,7 +13,7 @@ //===----------------------------------------------------------------------===// #include "sanitizer_platform.h" -#ifdef __APPLE__ +#if SANITIZER_MAC #include "sanitizer_internal_defs.h" #include "sanitizer_symbolizer.h" diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_win.cc b/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_win.cc index b979e6a..c17b9c2 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_win.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_win.cc @@ -13,7 +13,7 @@ //===----------------------------------------------------------------------===// #include "sanitizer_platform.h" -#ifdef _WIN32 +#if SANITIZER_WINDOWS #include #include "sanitizer_internal_defs.h" diff --git a/compiler-rt/lib/tsan/go/tsan_go.cc b/compiler-rt/lib/tsan/go/tsan_go.cc index b2aa622..5651fdf 100644 --- a/compiler-rt/lib/tsan/go/tsan_go.cc +++ b/compiler-rt/lib/tsan/go/tsan_go.cc @@ -184,7 +184,7 @@ void __tsan_finalizer_goroutine(ThreadState *thr) { AcquireGlobal(thr, 0); } -#ifdef _WIN32 +#if SANITIZER_WINDOWS // MinGW gcc emits calls to the function. void ___chkstk_ms(void) { // The implementation must be along the lines of: diff --git a/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc b/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc index e08fd95..54c7f8c 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc +++ b/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc @@ -350,4 +350,4 @@ int ExtractResolvFDs(void *state, int *fds, int nfd) { } // namespace __tsan -#endif // #ifdef __linux__ +#endif // SANITIZER_LINUX diff --git a/compiler-rt/lib/tsan/rtl/tsan_platform_mac.cc b/compiler-rt/lib/tsan/rtl/tsan_platform_mac.cc index b310ed0..5da9852 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_platform_mac.cc +++ b/compiler-rt/lib/tsan/rtl/tsan_platform_mac.cc @@ -13,7 +13,7 @@ //===----------------------------------------------------------------------===// #include "sanitizer_common/sanitizer_platform.h" -#ifdef __APPLE__ +#if SANITIZER_MAC #include "sanitizer_common/sanitizer_common.h" #include "sanitizer_common/sanitizer_libc.h" @@ -100,4 +100,4 @@ void GetThreadStackAndTls(bool main, uptr *stk_addr, uptr *stk_size, } // namespace __tsan -#endif // #ifdef __APPLE__ +#endif // SANITIZER_MAC diff --git a/compiler-rt/lib/tsan/rtl/tsan_platform_windows.cc b/compiler-rt/lib/tsan/rtl/tsan_platform_windows.cc index 93fe40c..83d2f39 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_platform_windows.cc +++ b/compiler-rt/lib/tsan/rtl/tsan_platform_windows.cc @@ -13,7 +13,7 @@ //===----------------------------------------------------------------------===// #include "sanitizer_common/sanitizer_platform.h" -#ifdef _WIN32 +#if SANITIZER_WINDOWS #include "tsan_platform.h" @@ -52,4 +52,4 @@ void GetThreadStackAndTls(bool main, uptr *stk_addr, uptr *stk_size, } // namespace __tsan -#endif // #ifdef _WIN32 +#endif // SANITIZER_WINDOWS -- 2.7.4