[PATCH] D74767: [CMake][NFC] Clean up CheckAtomic.cmake

Sam Elliott via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 24 04:48:13 PDT 2020


lenary accepted this revision.
lenary added a comment.
This revision is now accepted and ready to land.

I am happy that this is a simple logic refactoring of the original, given `LLVM_COMPILER_IS_GCC_COMPATIBLE` is currently just true/false based on the `MSVC` variable.

I am glad both blocks now have the same structure, which helps when debugging build issues.

LGTM (modulo nits below).



================
Comment at: llvm/cmake/modules/CheckAtomic.cmake:45
+  set(HAVE_CXX_ATOMICS_WITHOUT_LIB True)
+elseif(LLVM_COMPILER_IS_GCC_COMPATIBLE )
   # First check if atomics work without the library.
----------------
Nit: whitespace before `)`.


================
Comment at: llvm/cmake/modules/CheckAtomic.cmake:66
   set(HAVE_CXX_ATOMICS64_WITHOUT_LIB True)
-else()
+elseif(LLVM_COMPILER_IS_GCC_COMPATIBLE )
+  # First check if atomics work without the library.
----------------
Nit: whitespace before `)`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74767/new/

https://reviews.llvm.org/D74767





More information about the llvm-commits mailing list