summaryrefslogtreecommitdiffstats
path: root/contrib/libc++/include/__config
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/libc++/include/__config')
-rw-r--r--contrib/libc++/include/__config145
1 files changed, 119 insertions, 26 deletions
diff --git a/contrib/libc++/include/__config b/contrib/libc++/include/__config
index ca850d3..aa8bc44 100644
--- a/contrib/libc++/include/__config
+++ b/contrib/libc++/include/__config
@@ -11,7 +11,7 @@
#ifndef _LIBCPP_CONFIG
#define _LIBCPP_CONFIG
-#ifndef _MSC_VER // explicit macro necessary because it is only defined below in this file
+#if !defined(_MSC_VER) || defined(__clang__)
#pragma GCC system_header
#endif
@@ -72,15 +72,26 @@
# define _LIBCPP_LITTLE_ENDIAN 1
# define _LIBCPP_BIG_ENDIAN 0
// Compiler intrinsics (GCC or MSVC)
-# if (defined(_MSC_VER) && _MSC_VER >= 1400) \
+# if defined(__clang__) \
+ || (defined(_MSC_VER) && _MSC_VER >= 1400) \
|| (defined(__GNUC__) && _GNUC_VER > 403)
-# define _LIBCP_HAS_IS_BASE_OF
+# define _LIBCPP_HAS_IS_BASE_OF
+# endif
+# if defined(_MSC_VER) && !defined(__clang__)
+# define _LIBCPP_MSVC // Using Microsoft Visual C++ compiler
+# define _LIBCPP_TOSTRING2(x) #x
+# define _LIBCPP_TOSTRING(x) _LIBCPP_TOSTRING2(x)
+# define _LIBCPP_WARNING(x) __pragma(message(__FILE__ "(" _LIBCPP_TOSTRING(__LINE__) ") : warning note: " x))
+# endif
+# // If mingw not explicitly detected, assume using MS C runtime only.
+# ifndef __MINGW32__
+# define _LIBCPP_MSVCRT // Using Microsoft's C Runtime library
# endif
#endif // _WIN32
#ifdef __linux__
# if defined(__GNUC__) && _GNUC_VER >= 403
-# define _LIBCP_HAS_IS_BASE_OF
+# define _LIBCPP_HAS_IS_BASE_OF
# endif
#endif
@@ -127,8 +138,11 @@
# define _LIBCPP_TYPE_VIS
#endif
+#define _LIBCPP_TYPE_VIS_ONLY
+#define _LIBCPP_FUNC_VIS_ONLY
+
#ifndef _LIBCPP_INLINE_VISIBILITY
-# ifdef _MSC_VER
+# ifdef _LIBCPP_MSVC
# define _LIBCPP_INLINE_VISIBILITY __forceinline
# else // MinGW GCC and Clang
# define _LIBCPP_INLINE_VISIBILITY __attribute__ ((__always_inline__))
@@ -140,7 +154,7 @@
#endif
#ifndef _LIBCPP_ALWAYS_INLINE
-# ifdef _MSC_VER
+# ifdef _LIBCPP_MSVC
# define _LIBCPP_ALWAYS_INLINE __forceinline
# endif
#endif
@@ -160,13 +174,21 @@
#endif
#ifndef _LIBCPP_TYPE_VIS
-# if __has_attribute(type_visibility)
+# if __has_attribute(__type_visibility__)
# define _LIBCPP_TYPE_VIS __attribute__ ((__type_visibility__("default")))
# else
# define _LIBCPP_TYPE_VIS __attribute__ ((__visibility__("default")))
# endif
#endif
+#ifndef _LIBCPP_TYPE_VIS_ONLY
+# define _LIBCPP_TYPE_VIS_ONLY _LIBCPP_TYPE_VIS
+#endif
+
+#ifndef _LIBCPP_FUNC_VIS_ONLY
+# define _LIBCPP_FUNC_VIS_ONLY _LIBCPP_FUNC_VIS
+#endif
+
#ifndef _LIBCPP_INLINE_VISIBILITY
#define _LIBCPP_INLINE_VISIBILITY __attribute__ ((__visibility__("hidden"), __always_inline__))
#endif
@@ -175,10 +197,6 @@
#define _LIBCPP_EXCEPTION_ABI _LIBCPP_TYPE_VIS
#endif
-#ifndef _LIBCPP_CANTTHROW
-#define _LIBCPP_CANTTHROW __attribute__ ((__nothrow__))
-#endif
-
#ifndef _LIBCPP_ALWAYS_INLINE
#define _LIBCPP_ALWAYS_INLINE __attribute__ ((__visibility__("hidden"), __always_inline__))
#endif
@@ -273,7 +291,7 @@ typedef __char32_t char32_t;
#endif
#if __has_feature(is_base_of)
-# define _LIBCP_HAS_IS_BASE_OF
+# define _LIBCPP_HAS_IS_BASE_OF
#endif
// Objective-C++ features (opt-in)
@@ -396,13 +414,14 @@ namespace _LIBCPP_NAMESPACE {
using namespace _LIBCPP_NAMESPACE __attribute__((__strong__));
}
-#elif defined(_MSC_VER)
+#elif defined(_LIBCPP_MSVC)
#define _LIBCPP_HAS_NO_TEMPLATE_ALIASES
#define _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER
#define _LIBCPP_HAS_NO_CONSTEXPR
#define _LIBCPP_HAS_NO_UNICODE_CHARS
#define _LIBCPP_HAS_NO_DELETED_FUNCTIONS
+#define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
#define __alignof__ __alignof
#define _LIBCPP_NORETURN __declspec(noreturn)
#define _ALIGNAS(x) __declspec(align(x))
@@ -415,10 +434,43 @@ using namespace _LIBCPP_NAMESPACE __attribute__((__strong__));
#define _LIBCPP_END_NAMESPACE_STD }
#define _VSTD std
+# define _LIBCPP_WEAK
+namespace std {
+}
+
+#elif defined(__IBMCPP__)
+
+#define _ALIGNAS(x) __attribute__((__aligned__(x)))
+#define _ALIGNAS_TYPE(x) __attribute__((__aligned__(__alignof(x))))
+#define _ATTRIBUTE(x) __attribute__((x))
+#define _LIBCPP_NORETURN __attribute__((noreturn))
+
+#define _NOEXCEPT throw()
+#define _NOEXCEPT_(x)
+
+#define _LIBCPP_HAS_NO_TEMPLATE_ALIASES
+#define _LIBCPP_HAS_NO_ADVANCED_SFINAE
+#define _LIBCPP_HAS_NO_ALWAYS_INLINE_VARIADICS
+#define _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+#define _LIBCPP_HAS_NO_NULLPTR
+#define _LIBCPP_HAS_NO_UNICODE_CHARS
+#define _LIBCPP_HAS_NO_STRONG_ENUMS
+#define _LIBCPP_HAS_IS_BASE_OF
+
+#if defined(_AIX)
+#define __MULTILOCALE_API
+#endif
+
+#define _LIBCPP_BEGIN_NAMESPACE_STD namespace std {inline namespace _LIBCPP_NAMESPACE {
+#define _LIBCPP_END_NAMESPACE_STD } }
+#define _VSTD std::_LIBCPP_NAMESPACE
+
namespace std {
+ inline namespace _LIBCPP_NAMESPACE {
+ }
}
-#endif // __clang__ || __GNUC___ || _MSC_VER
+#endif // __clang__ || __GNUC___ || _MSC_VER || __IBMCPP__
#ifdef _LIBCPP_HAS_NO_UNICODE_CHARS
typedef unsigned short char16_t;
@@ -481,8 +533,23 @@ template <unsigned> struct __static_assert_check {};
#define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x)
#endif // _LIBCPP_HAS_NO_STRONG_ENUMS
+#ifdef _LIBCPP_DEBUG
+# if _LIBCPP_DEBUG == 0
+# define _LIBCPP_DEBUG_LEVEL 1
+# elif _LIBCPP_DEBUG == 1
+# define _LIBCPP_DEBUG_LEVEL 2
+# else
+# error Supported values for _LIBCPP_DEBUG are 0 and 1
+# endif
+# define _LIBCPP_EXTERN_TEMPLATE(...)
+#endif
+
#ifndef _LIBCPP_EXTERN_TEMPLATE
-#define _LIBCPP_EXTERN_TEMPLATE(...) extern template __VA_ARGS__;
+#define _LIBCPP_EXTERN_TEMPLATE(...)
+#endif
+
+#ifndef _LIBCPP_EXTERN_TEMPLATE2
+#define _LIBCPP_EXTERN_TEMPLATE2(...) extern template __VA_ARGS__;
#endif
#if defined(__APPLE__) || defined(__FreeBSD__) || defined(_WIN32) || defined(__sun__) || defined(__NetBSD__)
@@ -500,14 +567,14 @@ template <unsigned> struct __static_assert_check {};
#define _LIBCPP_WCTYPE_IS_MASK
#endif
-#ifdef _LIBCPP_DEBUG2
-# if _LIBCPP_DEBUG2 == 0
-# define _LIBCPP_DEBUG_LEVEL 1
-# elif _LIBCPP_DEBUG2 == 1
-# define _LIBCPP_DEBUG_LEVEL 2
-# else
-# error Supported values for _LIBCPP_DEBUG2 are 0 and 1
-# endif
+#if defined(__APPLE__)
+#ifndef _LIBCPP_TRIVIAL_PAIR_COPY_CTOR
+# define _LIBCPP_TRIVIAL_PAIR_COPY_CTOR 0
+#endif
+#endif
+
+#ifndef _LIBCPP_TRIVIAL_PAIR_COPY_CTOR
+# define _LIBCPP_TRIVIAL_PAIR_COPY_CTOR 1
#endif
#ifndef _LIBCPP_STD_VER
@@ -518,10 +585,36 @@ template <unsigned> struct __static_assert_check {};
# endif
#endif // _LIBCPP_STD_VER
-#ifdef _LIBCPP_DEBUG2
-# include <__debug>
+#if _LIBCPP_STD_VER > 11
+#define _LIBCPP_DEPRECATED [[deprecated]]
+#else
+#define _LIBCPP_DEPRECATED
+#endif
+
+#if _LIBCPP_STD_VER <= 11
+#define _LIBCPP_CONSTEXPR_AFTER_CXX11
+#define _LIBCPP_EXPLICIT_AFTER_CXX11
+#define _LIBCPP_DEPRECATED_AFTER_CXX11
#else
-# define _LIBCPP_ASSERT(x, m) ((void)0)
+#define _LIBCPP_CONSTEXPR_AFTER_CXX11 constexpr
+#define _LIBCPP_EXPLICIT_AFTER_CXX11 explicit
+#define _LIBCPP_DEPRECATED_AFTER_CXX11 [[deprecated]]
+#endif
+
+// Try to find out if RTTI is disabled.
+// g++ and cl.exe have RTTI on by default and define a macro when it is.
+// g++ only defines the macro in 4.3.2 and onwards.
+#if !defined(_LIBCPP_NO_RTTI)
+# if defined(__GNUG__) && (__GNUC__ >= 4 && \
+ (__GNUC_MINOR__ >= 3 || __GNUC_PATCHLEVEL__ >= 2)) && !defined(__GXX_RTTI)
+# define _LIBCPP_NO_RTTI
+# elif (defined(_MSC_VER) && !defined(__clang__)) && !defined(_CPPRTTI)
+# define _LIBCPP_NO_RTTI
+# endif
+#endif
+
+#ifndef _LIBCPP_WEAK
+# define _LIBCPP_WEAK __attribute__((__weak__))
#endif
#endif // _LIBCPP_CONFIG
OpenPOWER on IntegriCloud