summaryrefslogtreecommitdiffstats
path: root/llvm/cmake/modules
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/cmake/modules')
-rw-r--r--llvm/cmake/modules/CheckAtomic.cmake6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/cmake/modules/CheckAtomic.cmake b/llvm/cmake/modules/CheckAtomic.cmake
index 29f3bdd57f0..34ab8e98de4 100644
--- a/llvm/cmake/modules/CheckAtomic.cmake
+++ b/llvm/cmake/modules/CheckAtomic.cmake
@@ -12,8 +12,12 @@ function(check_working_cxx_atomics varname)
CHECK_CXX_SOURCE_COMPILES("
#include <atomic>
std::atomic<int> x;
+std::atomic<short> y;
+std::atomic<char> z;
int main() {
- return x;
+ ++z;
+ ++y;
+ return ++x;
}
" ${varname})
set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
OpenPOWER on IntegriCloud