forked from OSchip/llvm-project
Misc drive-by cleanups. NFC
http://reviews.llvm.org/D12294 llvm-svn: 245876
This commit is contained in:
parent
12e1997e4b
commit
91b3a5e7c5
|
@ -85,7 +85,7 @@ option(LIBCXX_ENABLE_THREADS "Build libc++ with support for threads." ON)
|
|||
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_CLOCK -D_LIBCPP_HAS_NO_MONOTONIC_CLOCK)
|
|||
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.
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
#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
|
||||
'libcpp-has-no-threads' is available iff _LIBCPP_HAS_NO_THREADS is defined
|
||||
#endif
|
||||
|
||||
int main()
|
|
@ -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), "");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue