From 4889a16c9f45bf83fd9ddc46982a30613e890c4c Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Mon, 27 Oct 2014 21:38:23 +0000 Subject: [PATCH] Add test to ensure including fails when _LIBCPP_HAS_NO_THREADS is defined. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@220722 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/atomics/libcpp-has-no-threads.fail.cpp | 23 +++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 test/atomics/libcpp-has-no-threads.fail.cpp 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() +{ +}