diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2021-08-21 21:27:36 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2021-08-21 21:27:36 +0000 |
commit | d545c2ce5ad1891282e8818b47ffe557c76a86b4 (patch) | |
tree | 98c4a1af94aa0ecc49fb4192ac42564bbe3dc3fd /libcxx/include/__config | |
parent | 9cb5bdb8b26e2207293f0fb56701c4a0ff64a47d (diff) | |
download | src-a4bcf8a8f802c1e6c718bc7fda414b2f23802705.tar.gz src-a4bcf8a8f802c1e6c718bc7fda414b2f23802705.zip |
Vendor import of llvm-project branch release/13.x llvmorg-13.0.0-rc1-97-g23ba3732246a.vendor/llvm-project/llvmorg-13.0.0-rc1-97-g23ba3732246a
Diffstat (limited to 'libcxx/include/__config')
-rw-r--r-- | libcxx/include/__config | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libcxx/include/__config b/libcxx/include/__config index 3cf23694f878..97e33f3157aa 100644 --- a/libcxx/include/__config +++ b/libcxx/include/__config @@ -354,6 +354,16 @@ # define _LIBCPP_NO_CFI #endif +// If the compiler supports using_if_exists, pretend we have those functions and they'll +// be picked up if the C library provides them. +// +// TODO: Once we drop support for Clang 12, we can assume the compiler supports using_if_exists +// for platforms that don't have a conforming C11 library, so we can drop this whole thing. +#if __has_attribute(using_if_exists) +# define _LIBCPP_HAS_TIMESPEC_GET +# define _LIBCPP_HAS_QUICK_EXIT +# define _LIBCPP_HAS_ALIGNED_ALLOC +#else #if (defined(__ISO_C_VISIBLE) && (__ISO_C_VISIBLE >= 2011)) || __cplusplus >= 201103L # if defined(__FreeBSD__) # define _LIBCPP_HAS_ALIGNED_ALLOC @@ -408,6 +418,7 @@ # endif # endif // __APPLE__ #endif +#endif // __has_attribute(using_if_exists) #ifndef _LIBCPP_CXX03_LANG # define _LIBCPP_ALIGNOF(_Tp) alignof(_Tp) |