[PATCH] D16614: Use "long long int" when checking whether atomics are supported.

Vasileios Kalintiris via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 26 16:45:58 PST 2016

vkalintiris created this revision.
vkalintiris added reviewers: dsanders, chandlerc, jyknight.
vkalintiris added a subscriber: llvm-commits.

Some targets implement 4-byte atomic related functions without calling
into libatomic, while for 8-byte atomics they need to make a function
call. By using a long long int we can identify such cases.



Index: cmake/modules/CheckAtomic.cmake
--- cmake/modules/CheckAtomic.cmake
+++ cmake/modules/CheckAtomic.cmake
@@ -10,7 +10,7 @@
   set(CMAKE_REQUIRED_FLAGS "-std=c++11")
 #include <atomic>
-std::atomic<int> x;
+std::atomic<long long int> x;
 int main() {
   return x;

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16614.46081.patch
Type: text/x-patch
Size: 371 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160127/f83a42b4/attachment.bin>

More information about the llvm-commits mailing list