summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/utilities/time
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2019-11-18 12:16:45 -0800
committerDan Albert <danalbert@google.com>2019-11-18 12:19:58 -0800
commit19fd9039ca242f408493b5c662f9d908eab8555e (patch)
treeecb1be767cbf77b440e7d67b55862df29b1c6c26 /libcxx/test/std/utilities/time
parentfffcd3e48ecf3f66d97c3b4daf624b3b2f9d74bf (diff)
downloadbcm5719-llvm-19fd9039ca242f408493b5c662f9d908eab8555e.tar.gz
bcm5719-llvm-19fd9039ca242f408493b5c662f9d908eab8555e.zip
Fix _LIBCPP_HAS_ definitions for Android.
Summary: Android added quick_exit()/at_quick_exit() in API level 21, aligned_alloc() in API level 28, and timespec_get() in API level 29, but has the other C11 features at all API levels (since they're basically just coming from clang directly). _LIBCPP_HAS_QUICK_EXIT and _LIBCPP_HAS_TIMESPEC_GET already existed, so we can reuse them. (And use _LIBCPP_HAS_TIMESPEC_GET in a few more places where _LIBCPP_HAS_C11_FEATURES has been used as a proxy. This isn't correct for Android.) _LIBCPP_HAS_ALIGNED_ALLOC is added, to cover aligned_alloc() (obviously). Add a missing std:: before aligned_alloc in a cstdlib test, and remove a couple of !defined(_WIN32)s now that we're explicitly testing TEST_HAS_ALIGNED_ALLOC rather than TEST_HAS_C11_FEATURES. Reviewers: danalbert, EricWF, mclow.lists Reviewed By: danalbert Subscribers: srhines, christof, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D69929
Diffstat (limited to 'libcxx/test/std/utilities/time')
-rw-r--r--libcxx/test/std/utilities/time/date.time/ctime.pass.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libcxx/test/std/utilities/time/date.time/ctime.pass.cpp b/libcxx/test/std/utilities/time/date.time/ctime.pass.cpp
index ac29fd78180..da16c85e7cd 100644
--- a/libcxx/test/std/utilities/time/date.time/ctime.pass.cpp
+++ b/libcxx/test/std/utilities/time/date.time/ctime.pass.cpp
@@ -19,7 +19,7 @@
#error CLOCKS_PER_SEC not defined
#endif
-#if TEST_STD_VER > 14 && defined(TEST_HAS_C11_FEATURES)
+#if TEST_STD_VER > 14 && defined(TEST_HAS_TIMESPEC_GET)
#ifndef TIME_UTC
#error TIME_UTC not defined
#endif
@@ -41,7 +41,7 @@ int main(int, char**)
((void)t); // Prevent unused warning
((void)tm); // Prevent unused warning
((void)str); // Prevent unused warning
-#if TEST_STD_VER > 14 && defined(TEST_HAS_C11_FEATURES)
+#if TEST_STD_VER > 14 && defined(TEST_HAS_TIMESPEC_GET)
std::timespec tmspec = {};
((void)tmspec); // Prevent unused warning
#endif
OpenPOWER on IntegriCloud