forked from OSchip/llvm-project
[libc++] Ensure __config always defines certain configuration macros.
This commit is contained in:
parent
2c91d5ba83
commit
fda3825c7a
libcxx/include
|
@ -881,6 +881,10 @@ typedef unsigned int char32_t;
|
|||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef _LIBCPP_DEBUG_LEVEL
|
||||
# define _LIBCPP_DEBUG_LEVEL 0
|
||||
#endif
|
||||
|
||||
#ifdef _LIBCPP_DISABLE_EXTERN_TEMPLATE
|
||||
#define _LIBCPP_EXTERN_TEMPLATE(...)
|
||||
#define _LIBCPP_EXTERN_TEMPLATE2(...)
|
||||
|
@ -1254,6 +1258,14 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container(
|
|||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef _LIBCPP_THREAD_SAFETY_ANNOTATION
|
||||
# ifdef _LIBCPP_HAS_THREAD_SAFETY_ANNOTATIONS
|
||||
# define _LIBCPP_THREAD_SAFETY_ANNOTATION(x) __attribute__((x))
|
||||
# else
|
||||
# define _LIBCPP_THREAD_SAFETY_ANNOTATION(x)
|
||||
# endif
|
||||
#endif // _LIBCPP_THREAD_SAFETY_ANNOTATION
|
||||
|
||||
#if __has_attribute(require_constant_initialization)
|
||||
# define _LIBCPP_SAFE_STATIC __attribute__((__require_constant_initialization__))
|
||||
#else
|
||||
|
|
|
@ -29,15 +29,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD
|
|||
|
||||
#ifndef _LIBCPP_HAS_NO_THREADS
|
||||
|
||||
#ifndef _LIBCPP_THREAD_SAFETY_ANNOTATION
|
||||
# ifdef _LIBCPP_HAS_THREAD_SAFETY_ANNOTATIONS
|
||||
# define _LIBCPP_THREAD_SAFETY_ANNOTATION(x) __attribute__((x))
|
||||
# else
|
||||
# define _LIBCPP_THREAD_SAFETY_ANNOTATION(x)
|
||||
# endif
|
||||
#endif // _LIBCPP_THREAD_SAFETY_ANNOTATION
|
||||
|
||||
|
||||
class _LIBCPP_TYPE_VIS _LIBCPP_THREAD_SAFETY_ANNOTATION(capability("mutex")) mutex
|
||||
{
|
||||
__libcpp_mutex_t __m_ = _LIBCPP_MUTEX_INITIALIZER;
|
||||
|
|
Loading…
Reference in New Issue