diff --git a/source/compare_win.cc b/source/compare_win.cc index 2ca98cd72..e6cb20528 100644 --- a/source/compare_win.cc +++ b/source/compare_win.cc @@ -16,13 +16,12 @@ namespace libyuv { extern "C" { #endif -#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && defined(_MSC_VER) - // ClangCL use posix source instead. -#if defined(__clang__) +#if defined(__clang__) && defined(_MSC_VER) #include "source/compare_posix.cc" -#else +// This module is for Visual C. +#elif !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && defined(_MSC_VER) __declspec(naked) uint32 SumSquareError_SSE2(const uint8* src_a, const uint8* src_b, int count) { __asm { @@ -224,9 +223,7 @@ uint32 HashDjb2_AVX2(const uint8* src, int count, uint32 seed) { } } #endif // _MSC_VER >= 1700 - -#endif // defined(__clang__) -#endif // !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) ... +#endif // defined(__clang__) && defined(_MSC_VER) #ifdef __cplusplus } // extern "C" diff --git a/source/row_win.cc b/source/row_win.cc index 6713692a1..246e7d9e1 100644 --- a/source/row_win.cc +++ b/source/row_win.cc @@ -21,14 +21,13 @@ namespace libyuv { extern "C" { #endif -// This module is for Visual C. -#if !defined(LIBYUV_DISABLE_X86) && (defined(_M_IX86) || defined(_M_X64)) && \ - defined(_MSC_VER) - // ClangCL use posix source instead. -#if defined(__clang__) +#if defined(__clang__) && defined(_MSC_VER) #include "source/row_posix.cc" -#else + +// This module is for Visual C. +#elif !defined(LIBYUV_DISABLE_X86) && (defined(_M_IX86) || defined(_M_X64)) && \ + defined(_MSC_VER) struct YuvConstants { lvec8 kUVToB; // 0 @@ -6420,8 +6419,7 @@ void ARGBLumaColorTableRow_SSSE3(const uint8* src_argb, uint8* dst_argb, #endif // HAS_ARGBLUMACOLORTABLEROW_SSSE3 #endif // defined(_M_X64) -#endif // defined(__clang__) -#endif // !defined(LIBYUV_DISABLE_X86) && (defined(_M_IX86) ... +#endif // defined(__clang__) && defined(_MSC_VER) #ifdef __cplusplus } // extern "C" diff --git a/source/scale_win.cc b/source/scale_win.cc index 4a7be0b8a..4246f717f 100644 --- a/source/scale_win.cc +++ b/source/scale_win.cc @@ -16,13 +16,12 @@ namespace libyuv { extern "C" { #endif -// This module is for Visual C x86. -#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && defined(_MSC_VER) - // ClangCL use posix source instead. -#if defined(__clang__) +#if defined(__clang__) && defined(_MSC_VER) #include "source/scale_posix.cc" -#else + +// This module is for Visual C x86. +#elif !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && defined(_MSC_VER) // Offsets for source bytes 0 to 9 static uvec8 kShuf0 = @@ -1394,8 +1393,7 @@ int FixedDiv1_X86(int num, int div) { } } -#endif // defined(__clang__) -#endif // !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && ... +#endif // defined(__clang__) && defined(_MSC_VER) #ifdef __cplusplus } // extern "C"