Author: jroelofs Date: Mon Aug 24 16:20:07 2015 New Revision: 245876 URL: http://llvm.org/viewvc/llvm-project?rev=245876&view=rev Log: Misc drive-by cleanups. NFC
http://reviews.llvm.org/D12294 Added: libcxx/trunk/test/libcxx/atomics/ libcxx/trunk/test/libcxx/atomics/libcpp-has-no-threads.fail.cpp libcxx/trunk/test/libcxx/atomics/libcpp-has-no-threads.pass.cpp Removed: libcxx/trunk/test/std/atomics/libcpp-has-no-threads.fail.cpp libcxx/trunk/test/std/atomics/libcpp-has-no-threads.pass.cpp Modified: libcxx/trunk/CMakeLists.txt libcxx/trunk/test/std/utilities/date.time/tested_elsewhere.pass.cpp Modified: libcxx/trunk/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/CMakeLists.txt?rev=245876&r1=245875&r2=245876&view=diff ============================================================================== --- libcxx/trunk/CMakeLists.txt (original) +++ libcxx/trunk/CMakeLists.txt Mon Aug 24 16:20:07 2015 @@ -85,7 +85,7 @@ option(LIBCXX_ENABLE_THREADS "Build libc option(LIBCXX_ENABLE_THREAD_UNSAFE_C_FUNCTIONS "Build libc++ with support for thread-unsafe C functions" ON) option(LIBCXX_ENABLE_MONOTONIC_CLOCK "Build libc++ with support for a monotonic clock. - This option may only be used when LIBCXX_ENABLE_THREADS=OFF." ON) + This option may only be set to OFF when LIBCXX_ENABLE_THREADS=OFF." ON) # Misc options ---------------------------------------------------------------- option(LIBCXX_ENABLE_PEDANTIC "Compile with pedantic enabled." ON) @@ -248,7 +248,7 @@ define_if_not(LIBCXX_ENABLE_MONOTONIC_CL define_if_not(LIBCXX_ENABLE_THREAD_UNSAFE_C_FUNCTIONS -D_LIBCPP_HAS_NO_THREAD_UNSAFE_C_FUNCTIONS) -# Sanitizer flags +# Sanitizer flags ============================================================= # Configure for sanitizers. If LIBCXX_BUILT_STANDALONE then we have to do # the flag translation ourselves. Othewise LLVM's CMakeList.txt will handle it. Added: libcxx/trunk/test/libcxx/atomics/libcpp-has-no-threads.fail.cpp URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/atomics/libcpp-has-no-threads.fail.cpp?rev=245876&view=auto ============================================================================== --- libcxx/trunk/test/libcxx/atomics/libcpp-has-no-threads.fail.cpp (added) +++ libcxx/trunk/test/libcxx/atomics/libcpp-has-no-threads.fail.cpp Mon Aug 24 16:20:07 2015 @@ -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() +{ +} Added: libcxx/trunk/test/libcxx/atomics/libcpp-has-no-threads.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/atomics/libcpp-has-no-threads.pass.cpp?rev=245876&view=auto ============================================================================== --- libcxx/trunk/test/libcxx/atomics/libcpp-has-no-threads.pass.cpp (added) +++ libcxx/trunk/test/libcxx/atomics/libcpp-has-no-threads.pass.cpp Mon Aug 24 16:20:07 2015 @@ -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() +{ +} Removed: libcxx/trunk/test/std/atomics/libcpp-has-no-threads.fail.cpp URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/atomics/libcpp-has-no-threads.fail.cpp?rev=245875&view=auto ============================================================================== --- libcxx/trunk/test/std/atomics/libcpp-has-no-threads.fail.cpp (original) +++ libcxx/trunk/test/std/atomics/libcpp-has-no-threads.fail.cpp (removed) @@ -1,23 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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() -{ -} Removed: libcxx/trunk/test/std/atomics/libcpp-has-no-threads.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/atomics/libcpp-has-no-threads.pass.cpp?rev=245875&view=auto ============================================================================== --- libcxx/trunk/test/std/atomics/libcpp-has-no-threads.pass.cpp (original) +++ libcxx/trunk/test/std/atomics/libcpp-has-no-threads.pass.cpp (removed) @@ -1,18 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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() -{ -} Modified: libcxx/trunk/test/std/utilities/date.time/tested_elsewhere.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/date.time/tested_elsewhere.pass.cpp?rev=245876&r1=245875&r2=245876&view=diff ============================================================================== --- libcxx/trunk/test/std/utilities/date.time/tested_elsewhere.pass.cpp (original) +++ libcxx/trunk/test/std/utilities/date.time/tested_elsewhere.pass.cpp Mon Aug 24 16:20:07 2015 @@ -30,9 +30,11 @@ int main() static_assert((std::is_same<decltype(std::difftime(t,t)), double>::value), ""); static_assert((std::is_same<decltype(std::mktime(&tm)), std::time_t>::value), ""); static_assert((std::is_same<decltype(std::time(&t)), std::time_t>::value), ""); +#ifndef _LIBCPP_HAS_NO_THREAD_UNSAFE_C_FUNCTIONS static_assert((std::is_same<decltype(std::asctime(&tm)), char*>::value), ""); static_assert((std::is_same<decltype(std::ctime(&t)), char*>::value), ""); static_assert((std::is_same<decltype(std::gmtime(&t)), std::tm*>::value), ""); static_assert((std::is_same<decltype(std::localtime(&t)), std::tm*>::value), ""); +#endif static_assert((std::is_same<decltype(std::strftime(str,s,"",&tm)), std::size_t>::value), ""); } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits