summaryrefslogtreecommitdiffstats
path: root/libcxx/test/atomics/libcpp-has-no-threads.fail.cpp
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2014-10-27 21:38:23 +0000
committerEric Fiselier <eric@efcs.ca>2014-10-27 21:38:23 +0000
commitb2a6048b18304e7a86d59b6220611e30b8e06ec5 (patch)
treed09470631b7ea1cf0fbdefa5f9039cc8fe7f1208 /libcxx/test/atomics/libcpp-has-no-threads.fail.cpp
parent53c1612ed1b5a21d5ecfd7d2d35edf1961c3b3b2 (diff)
downloadbcm5719-llvm-b2a6048b18304e7a86d59b6220611e30b8e06ec5.tar.gz
bcm5719-llvm-b2a6048b18304e7a86d59b6220611e30b8e06ec5.zip
Add test to ensure including <atomic> fails when _LIBCPP_HAS_NO_THREADS is defined.
llvm-svn: 220722
Diffstat (limited to 'libcxx/test/atomics/libcpp-has-no-threads.fail.cpp')
-rw-r--r--libcxx/test/atomics/libcpp-has-no-threads.fail.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/libcxx/test/atomics/libcpp-has-no-threads.fail.cpp b/libcxx/test/atomics/libcpp-has-no-threads.fail.cpp
new file mode 100644
index 00000000000..fe95e6a5983
--- /dev/null
+++ b/libcxx/test/atomics/libcpp-has-no-threads.fail.cpp
@@ -0,0 +1,23 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <atomic>
+
+// Test that including <atomic> fails to compile when _LIBCPP_HAS_NO_THREADS
+// is defined.
+
+#ifndef _LIBCPP_HAS_NO_THREADS
+#define _LIBCPP_HAS_NO_THREADS
+#endif
+
+#include <atomic>
+
+int main()
+{
+}
OpenPOWER on IntegriCloud