[PATCH] D12294: Misc cleanups re-commandeered from D11963.

Jonathan Roelofs via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 24 14:07:35 PDT 2015


jroelofs created this revision.
jroelofs added a reviewer: EricWF.
jroelofs added a subscriber: cfe-commits.

This separates out the bits of D11963 which were drive-by fixes, which aren't really relevant to the __config_site part of that change.

http://reviews.llvm.org/D12294

Files:
  CMakeLists.txt
  test/std/atomics/libcpp-has-no-threads.fail.cpp
  test/std/atomics/libcpp-has-no-threads.pass.cpp
  test/std/utilities/date.time/tested_elsewhere.pass.cpp

Index: test/std/utilities/date.time/tested_elsewhere.pass.cpp
===================================================================
--- test/std/utilities/date.time/tested_elsewhere.pass.cpp
+++ test/std/utilities/date.time/tested_elsewhere.pass.cpp
@@ -30,9 +30,11 @@
     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), "");
 }
Index: test/std/atomics/libcpp-has-no-threads.pass.cpp
===================================================================
--- test/std/atomics/libcpp-has-no-threads.pass.cpp
+++ test/std/atomics/libcpp-has-no-threads.pass.cpp
@@ -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()
-{
-}
Index: test/std/atomics/libcpp-has-no-threads.fail.cpp
===================================================================
--- test/std/atomics/libcpp-has-no-threads.fail.cpp
+++ test/std/atomics/libcpp-has-no-threads.fail.cpp
@@ -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()
-{
-}
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -84,7 +84,7 @@
 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)
@@ -247,7 +247,7 @@
 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.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12294.32995.patch
Type: text/x-patch
Size: 3739 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150824/b4caaf2d/attachment.bin>


More information about the cfe-commits mailing list