From 33c2c02e250d1bbbe762980ba0b4e83a94615f97 Mon Sep 17 00:00:00 2001 From: Jonathan Roelofs Date: Mon, 27 Oct 2014 22:39:19 +0000 Subject: [PATCH] Test that the single-threaded lit feature is available iff the corresponding guard is #defined http://reviews.llvm.org/D6006 llvm-svn: 220729 --- .../atomics/libcpp-has-no-threads.pass.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 libcxx/test/atomics/libcpp-has-no-threads.pass.cpp diff --git a/libcxx/test/atomics/libcpp-has-no-threads.pass.cpp b/libcxx/test/atomics/libcpp-has-no-threads.pass.cpp new file mode 100644 index 000000000000..9c0cccbda380 --- /dev/null +++ b/libcxx/test/atomics/libcpp-has-no-threads.pass.cpp @@ -0,0 +1,18 @@ +//===----------------------------------------------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// +// XFAIL: libcpp-has-no-threads + +#ifdef _LIBCPP_HAS_NO_THREADS +#error This should be XFAIL'd for the purpose of detecting that the LIT feature\ + 'libcpp-has-no-threads' is available iff _LIBCPP_HAS_NO_THREADS is defined +#endif + +int main() +{ +}