[compiler-rt] r294497 - [sanitizer] if WINAPI is already defined, do not redefine it
Bob Haarman via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 8 10:34:05 PST 2017
Author: inglorion
Date: Wed Feb 8 12:34:05 2017
New Revision: 294497
URL: http://llvm.org/viewvc/llvm-project?rev=294497&view=rev
Log:
[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
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_win_defs.h
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_win_defs.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_win_defs.h?rev=294497&r1=294496&r2=294497&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_win_defs.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_win_defs.h Wed Feb 8 12:34:05 2017
@@ -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
More information about the llvm-commits
mailing list