diff options
author | Kamil Rytarowski <n54@gmx.com> | 2017-12-06 17:02:00 +0000 |
---|---|---|
committer | Kamil Rytarowski <n54@gmx.com> | 2017-12-06 17:02:00 +0000 |
commit | 230e72004d5e9365e3ce9676be84d496a3d2feb0 (patch) | |
tree | 4eb42ff3d0391907220d527fbeed47cb39c241e1 /lib/interception/interception_mac.h | |
parent | c89976de25cd7700d24796f7f2fa9f20e51e4813 (diff) |
[Sanitizers] Use SANITIZER_* macros in lib/interception
Summary:
Unlike the rest of the sanitizer code, lib/interception uses native macros like __linux__
to check for specific targets instead of the common ones like SANITIZER_LINUX.
When working on the Solaris port of the sanitizers, the current style was found to not
only be inconsistent, but clumsy to use because the canonical way to check for Solaris
is to check for __sun__ && __svr4__ which is a mouthful.
Therefore, this patch switches to use SANITIZER_* macros instead.
Tested on x86_64-pc-linux-gnu.
Reviewers: kcc, vitalybuka
Reviewed By: vitalybuka
Subscribers: #sanitizers, srhines, krytarowski, llvm-commits, fedor.sergeev
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D39798
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@319906 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/interception/interception_mac.h')
-rw-r--r-- | lib/interception/interception_mac.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/interception/interception_mac.h b/lib/interception/interception_mac.h index e5a35c697..6f31fed47 100644 --- a/lib/interception/interception_mac.h +++ b/lib/interception/interception_mac.h @@ -12,7 +12,7 @@ // Mac-specific interception methods. //===----------------------------------------------------------------------===// -#ifdef __APPLE__ +#if SANITIZER_MAC #if !defined(INCLUDED_FROM_INTERCEPTION_LIB) # error "interception_mac.h should be included from interception.h only" @@ -25,4 +25,4 @@ #define INTERCEPT_FUNCTION_VER_MAC(func, symver) #endif // INTERCEPTION_MAC_H -#endif // __APPLE__ +#endif // SANITIZER_MAC |