diff options
| author | Martin Storsjo <martin@martin.st> | 2018-09-25 19:50:32 +0000 |
|---|---|---|
| committer | Martin Storsjo <martin@martin.st> | 2018-09-25 19:50:32 +0000 |
| commit | fd9aa7e078a3b0ad486897dacba75b3c5207e352 (patch) | |
| tree | b6e47d8f95bafb47fe80d31c45d516a32abca494 | |
| parent | adde5ba4b20225e2cad18e22705bb434217666c1 (diff) | |
| download | bcm5719-llvm-fd9aa7e078a3b0ad486897dacba75b3c5207e352.tar.gz bcm5719-llvm-fd9aa7e078a3b0ad486897dacba75b3c5207e352.zip | |
[Sanitizers] [MinGW] Check for __i386__ in addition to _M_IX86 for i386 specific details
The MinGW headers do define _M_IX86 (contrary to clang-cl and
MSVC where it is a compiler predefined macro), but the headers that
define it aren't included here.
Also check these defines for setting the symbol prefix, instead of
inconsistently using _WIN64 for that.
Differential Revision: https://reviews.llvm.org/D51883
llvm-svn: 343013
| -rw-r--r-- | compiler-rt/lib/sanitizer_common/sanitizer_win_defs.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_win_defs.h b/compiler-rt/lib/sanitizer_common/sanitizer_win_defs.h index 077ff9ccc8d..19596cf9c8a 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_win_defs.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_win_defs.h @@ -17,17 +17,17 @@ #if SANITIZER_WINDOWS #ifndef WINAPI -#ifdef _M_IX86 +#if defined(_M_IX86) || defined(__i386__) #define WINAPI __stdcall #else #define WINAPI #endif #endif -#if defined(_WIN64) -#define WIN_SYM_PREFIX -#else +#if defined(_M_IX86) || defined(__i386__) #define WIN_SYM_PREFIX "_" +#else +#define WIN_SYM_PREFIX #endif // Intermediate macro to ensure the parameter is expanded before stringified. |

