[OpenMP] Check if _MSC_VER is defined before using it
authorAndreyChurbanov <andrey.churbanov@intel.com>
Mon, 24 Aug 2020 14:50:38 +0000 (17:50 +0300)
committerAndreyChurbanov <andrey.churbanov@intel.com>
Mon, 24 Aug 2020 14:50:38 +0000 (17:50 +0300)
Patch by mati865@gmail.com

Differential Revision: https://reviews.llvm.org/D86448

openmp/runtime/src/kmp_atomic.h

index bb01c31..8f70928 100644 (file)
@@ -39,7 +39,7 @@
 #define KMP_DO_ALIGN(alignment) /* Nothing */
 #endif
 
-#if (_MSC_VER < 1600) && defined(_DEBUG)
+#if defined(_MSC_VER) && (_MSC_VER < 1600) && defined(_DEBUG)
 // Workaround for the problem of _DebugHeapTag unresolved external.
 // This problem prevented to use our static debug library for C tests
 // compiled with /MDd option (the library itself built with /MTd),