[libcxx] r220722 - Add test to ensure including <atomic> fails when _LIBCPP_HAS_NO_THREADS is defined.

Eric Fiselier eric at efcs.ca
Mon Oct 27 14:38:23 PDT 2014


Author: ericwf
Date: Mon Oct 27 16:38:23 2014
New Revision: 220722

URL: http://llvm.org/viewvc/llvm-project?rev=220722&view=rev
Log:
Add test to ensure including <atomic> fails when _LIBCPP_HAS_NO_THREADS is defined.

Added:
    libcxx/trunk/test/atomics/libcpp-has-no-threads.fail.cpp

Added: libcxx/trunk/test/atomics/libcpp-has-no-threads.fail.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/atomics/libcpp-has-no-threads.fail.cpp?rev=220722&view=auto
==============================================================================
--- libcxx/trunk/test/atomics/libcpp-has-no-threads.fail.cpp (added)
+++ libcxx/trunk/test/atomics/libcpp-has-no-threads.fail.cpp Mon Oct 27 16:38:23 2014
@@ -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()
+{
+}





More information about the cfe-commits mailing list