[compiler-rt] r177401 - [sanitizer] More renamed macros.
Evgeniy Stepanov
eugeni.stepanov at gmail.com
Tue Mar 19 07:54:17 PDT 2013
Author: eugenis
Date: Tue Mar 19 09:54:17 2013
New Revision: 177401
URL: http://llvm.org/viewvc/llvm-project?rev=177401&view=rev
Log:
[sanitizer] More renamed macros.
Modified:
compiler-rt/trunk/lib/asan/asan_internal.h
compiler-rt/trunk/lib/asan/asan_mac.cc
compiler-rt/trunk/lib/asan/asan_malloc_mac.cc
compiler-rt/trunk/lib/asan/asan_malloc_win.cc
compiler-rt/trunk/lib/asan/asan_win.cc
compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc
compiler-rt/trunk/lib/sanitizer_common/sanitizer_internal_defs.h
compiler-rt/trunk/lib/sanitizer_common/sanitizer_procmaps.h
compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_mac.cc
compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_win.cc
compiler-rt/trunk/lib/tsan/go/tsan_go.cc
compiler-rt/trunk/lib/tsan/rtl/tsan_platform_linux.cc
compiler-rt/trunk/lib/tsan/rtl/tsan_platform_mac.cc
compiler-rt/trunk/lib/tsan/rtl/tsan_platform_windows.cc
Modified: compiler-rt/trunk/lib/asan/asan_internal.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_internal.h?rev=177401&r1=177400&r2=177401&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_internal.h (original)
+++ compiler-rt/trunk/lib/asan/asan_internal.h Tue Mar 19 09:54:17 2013
@@ -111,7 +111,7 @@ void PoisonShadowPartialRightRedzone(upt
u8 value);
// Platfrom-specific options.
-#ifdef __APPLE__
+#if SANITIZER_MAC
bool PlatformHasDifferentMemcpyAndMemmove();
# define PLATFORM_HAS_DIFFERENT_MEMCPY_AND_MEMMOVE \
(PlatformHasDifferentMemcpyAndMemmove())
Modified: compiler-rt/trunk/lib/asan/asan_mac.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_mac.cc?rev=177401&r1=177400&r2=177401&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_mac.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_mac.cc Tue Mar 19 09:54:17 2013
@@ -13,7 +13,7 @@
//===----------------------------------------------------------------------===//
#include "sanitizer_common/sanitizer_platform.h"
-#ifdef __APPLE__
+#if SANITIZER_MAC
#include "asan_interceptors.h"
#include "asan_internal.h"
Modified: compiler-rt/trunk/lib/asan/asan_malloc_mac.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_malloc_mac.cc?rev=177401&r1=177400&r2=177401&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_malloc_mac.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_malloc_mac.cc Tue Mar 19 09:54:17 2013
@@ -13,7 +13,7 @@
//===----------------------------------------------------------------------===//
#include "sanitizer_common/sanitizer_platform.h"
-#ifdef __APPLE__
+#if SANITIZER_MAC
#include <AvailabilityMacros.h>
#include <CoreFoundation/CFBase.h>
Modified: compiler-rt/trunk/lib/asan/asan_malloc_win.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_malloc_win.cc?rev=177401&r1=177400&r2=177401&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_malloc_win.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_malloc_win.cc Tue Mar 19 09:54:17 2013
@@ -13,7 +13,7 @@
//===----------------------------------------------------------------------===//
#include "sanitizer_common/sanitizer_platform.h"
-#ifdef _WIN32
+#if SANITIZER_WINDOWS
#include "asan_allocator.h"
#include "asan_interceptors.h"
Modified: compiler-rt/trunk/lib/asan/asan_win.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_win.cc?rev=177401&r1=177400&r2=177401&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_win.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_win.cc Tue Mar 19 09:54:17 2013
@@ -13,7 +13,7 @@
//===----------------------------------------------------------------------===//
#include "sanitizer_common/sanitizer_platform.h"
-#ifdef _WIN32
+#if SANITIZER_WINDOWS
#include <windows.h>
#include <dbghelp.h>
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc?rev=177401&r1=177400&r2=177401&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc Tue Mar 19 09:54:17 2013
@@ -24,7 +24,7 @@
#include <stdarg.h>
-#ifdef _WIN32
+#if SANITIZER_WINDOWS
#define va_copy(dst, src) ((dst) = (src))
#endif // _WIN32
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=177401&r1=177400&r2=177401&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_internal_defs.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_internal_defs.h Tue Mar 19 09:54:17 2013
@@ -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
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_procmaps.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_procmaps.h?rev=177401&r1=177400&r2=177401&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_procmaps.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_procmaps.h Tue Mar 19 09:54:17 2013
@@ -19,7 +19,7 @@
namespace __sanitizer {
-#ifdef _WIN32
+#if SANITIZER_WINDOWS
class MemoryMappingLayout {
public:
MemoryMappingLayout() {}
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_mac.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_mac.cc?rev=177401&r1=177400&r2=177401&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_mac.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_mac.cc Tue Mar 19 09:54:17 2013
@@ -13,7 +13,7 @@
//===----------------------------------------------------------------------===//
#include "sanitizer_platform.h"
-#ifdef __APPLE__
+#if SANITIZER_MAC
#include "sanitizer_internal_defs.h"
#include "sanitizer_symbolizer.h"
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_win.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_win.cc?rev=177401&r1=177400&r2=177401&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_win.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_win.cc Tue Mar 19 09:54:17 2013
@@ -13,7 +13,7 @@
//===----------------------------------------------------------------------===//
#include "sanitizer_platform.h"
-#ifdef _WIN32
+#if SANITIZER_WINDOWS
#include <windows.h>
#include "sanitizer_internal_defs.h"
Modified: compiler-rt/trunk/lib/tsan/go/tsan_go.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/go/tsan_go.cc?rev=177401&r1=177400&r2=177401&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/go/tsan_go.cc (original)
+++ compiler-rt/trunk/lib/tsan/go/tsan_go.cc Tue Mar 19 09:54:17 2013
@@ -184,7 +184,7 @@ void __tsan_finalizer_goroutine(ThreadSt
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:
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_platform_linux.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_platform_linux.cc?rev=177401&r1=177400&r2=177401&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_platform_linux.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_platform_linux.cc Tue Mar 19 09:54:17 2013
@@ -350,4 +350,4 @@ int ExtractResolvFDs(void *state, int *f
} // namespace __tsan
-#endif // #ifdef __linux__
+#endif // SANITIZER_LINUX
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_platform_mac.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_platform_mac.cc?rev=177401&r1=177400&r2=177401&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_platform_mac.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_platform_mac.cc Tue Mar 19 09:54:17 2013
@@ -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, upt
} // namespace __tsan
-#endif // #ifdef __APPLE__
+#endif // SANITIZER_MAC
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_platform_windows.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_platform_windows.cc?rev=177401&r1=177400&r2=177401&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_platform_windows.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_platform_windows.cc Tue Mar 19 09:54:17 2013
@@ -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, upt
} // namespace __tsan
-#endif // #ifdef _WIN32
+#endif // SANITIZER_WINDOWS
More information about the llvm-commits
mailing list