summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Haarman <llvm@inglorion.net>2017-02-08 18:34:05 +0000
committerBob Haarman <llvm@inglorion.net>2017-02-08 18:34:05 +0000
commit8be6460a9151b99a8a71804ff6ec68297fa1f07e (patch)
treea2b47e246e8274ee568ce0db815ae673e5c7365d
parent77732b89eb56866774c6e17f9e7cd52de4b96723 (diff)
[sanitizer] if WINAPI is already defined, do not redefine it
Summary: lib/sanitizer_common/sanitizer_win_defs.h defineds WINAPI, which is also defined by standard Windows headers. Redefining it causes warnings during compilation. This change causes us to only define WINAPI if it is not already defined, which avoids the warnings. Reviewers: rnk, zturner, mpividori Reviewed By: rnk, mpividori Subscribers: kubamracek Differential Revision: https://reviews.llvm.org/D29683 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@294497 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/sanitizer_common/sanitizer_win_defs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/sanitizer_common/sanitizer_win_defs.h b/lib/sanitizer_common/sanitizer_win_defs.h
index 74839c0a6..077ff9ccc 100644
--- a/lib/sanitizer_common/sanitizer_win_defs.h
+++ b/lib/sanitizer_common/sanitizer_win_defs.h
@@ -16,11 +16,13 @@
#include "sanitizer_platform.h"
#if SANITIZER_WINDOWS
+#ifndef WINAPI
#ifdef _M_IX86
#define WINAPI __stdcall
#else
#define WINAPI
#endif
+#endif
#if defined(_WIN64)
#define WIN_SYM_PREFIX