[llvm] r319917 - [cmake] Remove unnecessary header include in atomics check

Shoaib Meenai via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 6 10:33:07 PST 2017


Author: smeenai
Date: Wed Dec  6 10:33:07 2017
New Revision: 319917

URL: http://llvm.org/viewvc/llvm-project?rev=319917&view=rev
Log:
[cmake] Remove unnecessary header include in atomics check

The header include was required to work around PR19898, as noted in that
comment. That PR has since been marked resolved fixed, and the
configuration check passes without the header inclusion both when
compiling on Windows with cl and when cross-compiling on Linux using
clang-cl.

I noticed this because the inclusion was cased incorrectly (Intrin.h
instead of intrin.h), which when cross-compiling on a case sensitive
file system would cause the intrin.h from the Windows SDK to be included
(which LLVM can't handle) instead of the one from clang's resource
directory, making the check fail. This is the same issue as r309980.
Correcting the case of the inclusion makes the check pass when cross
compiling, but it seems better to get rid of the inclusion entirely,
since it appears to be unnecessary now.

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

Modified:
    llvm/trunk/cmake/modules/CheckAtomic.cmake

Modified: llvm/trunk/cmake/modules/CheckAtomic.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/CheckAtomic.cmake?rev=319917&r1=319916&r2=319917&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/CheckAtomic.cmake (original)
+++ llvm/trunk/cmake/modules/CheckAtomic.cmake Wed Dec  6 10:33:07 2017
@@ -81,7 +81,6 @@ endif()
 ## assumes C++11 <atomic> works.
 CHECK_CXX_SOURCE_COMPILES("
 #ifdef _MSC_VER
-#include <Intrin.h> /* Workaround for PR19898. */
 #include <windows.h>
 #endif
 int main() {




More information about the llvm-commits mailing list