diff --git a/test/atomics/libcpp-has-no-threads.fail.cpp b/test/atomics/libcpp-has-no-threads.fail.cpp new file mode 100644 index 00000000..fe95e6a5 --- /dev/null +++ b/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. +// +//===----------------------------------------------------------------------===// + +// + +// Test that including fails to compile when _LIBCPP_HAS_NO_THREADS +// is defined. + +#ifndef _LIBCPP_HAS_NO_THREADS +#define _LIBCPP_HAS_NO_THREADS +#endif + +#include + +int main() +{ +}