aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-04-01 16:01:04 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-04-01 16:01:04 -0700
commit00c2e03551a61ca76bdb303f1c007845f8a6dbd6 (patch)
tree51a3fb38eff156561441960606533fd0c1be71df
parent36600f34ef0ec2cf75165be3753567e256f514db (diff)
parent2787d1f7d01afb598ed56c4d52dab876e0a34a74 (diff)
Merge pull request #1009 from waywardmonkeys/another-libcxx-update1.3.6
Another libcxx update
-rw-r--r--system/include/libcxx/__bit_reference10
-rw-r--r--system/include/libcxx/__config47
-rw-r--r--system/include/libcxx/__debug18
-rw-r--r--system/include/libcxx/__functional_0314
-rw-r--r--system/include/libcxx/__functional_base10
-rw-r--r--system/include/libcxx/__functional_base_032
-rw-r--r--system/include/libcxx/__hash_table40
-rw-r--r--system/include/libcxx/__locale86
-rw-r--r--system/include/libcxx/__mutex_base16
-rw-r--r--system/include/libcxx/__std_stream30
-rw-r--r--system/include/libcxx/__tree42
-rw-r--r--system/include/libcxx/__tuple30
-rw-r--r--system/include/libcxx/__tuple_034
-rw-r--r--system/include/libcxx/array10
-rw-r--r--system/include/libcxx/bitset10
-rw-r--r--system/include/libcxx/chrono18
-rw-r--r--system/include/libcxx/codecvt6
-rw-r--r--system/include/libcxx/complex14
-rw-r--r--system/include/libcxx/condition_variable4
-rw-r--r--system/include/libcxx/cstddef2
-rw-r--r--system/include/libcxx/cwchar2
-rw-r--r--system/include/libcxx/deque10
-rw-r--r--system/include/libcxx/exception18
-rw-r--r--system/include/libcxx/ext/__hash6
-rw-r--r--system/include/libcxx/ext/hash_map26
-rw-r--r--system/include/libcxx/ext/hash_set4
-rw-r--r--system/include/libcxx/forward_list14
-rw-r--r--system/include/libcxx/fstream8
-rw-r--r--system/include/libcxx/functional106
-rw-r--r--system/include/libcxx/future38
-rw-r--r--system/include/libcxx/initializer_list2
-rw-r--r--system/include/libcxx/ios16
-rw-r--r--system/include/libcxx/iosfwd40
-rw-r--r--system/include/libcxx/iostream16
-rw-r--r--system/include/libcxx/istream21
-rw-r--r--system/include/libcxx/iterator36
-rw-r--r--system/include/libcxx/limits8
-rw-r--r--system/include/libcxx/list10
-rw-r--r--system/include/libcxx/locale70
-rw-r--r--system/include/libcxx/map24
-rw-r--r--system/include/libcxx/memory62
-rw-r--r--system/include/libcxx/mutex10
-rw-r--r--system/include/libcxx/new24
-rw-r--r--system/include/libcxx/ostream6
-rw-r--r--system/include/libcxx/queue10
-rw-r--r--system/include/libcxx/random98
-rw-r--r--system/include/libcxx/ratio22
-rw-r--r--system/include/libcxx/readme.txt2
-rw-r--r--system/include/libcxx/regex24
-rw-r--r--system/include/libcxx/scoped_allocator2
-rw-r--r--system/include/libcxx/set4
-rw-r--r--system/include/libcxx/sstream8
-rw-r--r--system/include/libcxx/stack6
-rw-r--r--system/include/libcxx/streambuf2
-rw-r--r--system/include/libcxx/string16
-rw-r--r--system/include/libcxx/strstream8
-rw-r--r--system/include/libcxx/system_error22
-rw-r--r--system/include/libcxx/thread20
-rw-r--r--system/include/libcxx/tuple16
-rw-r--r--system/include/libcxx/type_traits360
-rw-r--r--system/include/libcxx/typeindex6
-rw-r--r--system/include/libcxx/unordered_map26
-rw-r--r--system/include/libcxx/unordered_set4
-rw-r--r--system/include/libcxx/utility18
-rw-r--r--system/include/libcxx/valarray40
-rw-r--r--system/include/libcxx/vector93
-rw-r--r--system/lib/libcxx/chrono.cpp4
-rw-r--r--system/lib/libcxx/debug.cpp4
-rw-r--r--system/lib/libcxx/exception.cpp4
-rw-r--r--system/lib/libcxx/iostream.cpp14
-rw-r--r--system/lib/libcxx/locale.cpp18
-rw-r--r--system/lib/libcxx/memory.cpp10
-rw-r--r--system/lib/libcxx/new.cpp2
-rw-r--r--system/lib/libcxx/readme.txt2
-rw-r--r--system/lib/libcxx/stdexcept.cpp2
-rw-r--r--system/lib/libcxx/string.cpp2
-rw-r--r--system/lib/libcxx/strstream.cpp2
-rw-r--r--system/lib/libcxx/symbols18
-rw-r--r--system/lib/libcxx/thread.cpp4
-rw-r--r--system/lib/libcxx/typeinfo.cpp4
-rw-r--r--tools/shared.py2
81 files changed, 991 insertions, 898 deletions
diff --git a/system/include/libcxx/__bit_reference b/system/include/libcxx/__bit_reference
index 8180295b..1621deb8 100644
--- a/system/include/libcxx/__bit_reference
+++ b/system/include/libcxx/__bit_reference
@@ -81,6 +81,16 @@ class __bit_reference<_Cp, false>
{
};
+template <class _Cp>
+_LIBCPP_INLINE_VISIBILITY inline
+void
+swap(__bit_reference<_Cp> __x, __bit_reference<_Cp> __y) _NOEXCEPT
+{
+ bool __t = __x;
+ __x = __y;
+ __y = __t;
+}
+
template <class _Cp, class _Dp>
_LIBCPP_INLINE_VISIBILITY inline
void
diff --git a/system/include/libcxx/__config b/system/include/libcxx/__config
index 8617b866..959390d5 100644
--- a/system/include/libcxx/__config
+++ b/system/include/libcxx/__config
@@ -11,7 +11,7 @@
#ifndef _LIBCPP_CONFIG
#define _LIBCPP_CONFIG
-#if !_MSC_VER // explicit macro necessary because it is only defined below in this file
+#ifndef _MSC_VER // explicit macro necessary because it is only defined below in this file
#pragma GCC system_header
#endif
@@ -96,24 +96,27 @@
# endif
#endif // !defined(_LIBCPP_LITTLE_ENDIAN) || !defined(_LIBCPP_BIG_ENDIAN)
-#if _WIN32
+#ifdef _WIN32
// only really useful for a DLL
#ifdef _LIBCPP_DLL // this should be a compiler builtin define ideally...
# ifdef cxx_EXPORTS
# define _LIBCPP_HIDDEN
-# define _LIBCPP_VISIBLE __declspec(dllexport)
+# define _LIBCPP_FUNC_VIS __declspec(dllexport)
+# define _LIBCPP_TYPE_VIS __declspec(dllexport)
# else
# define _LIBCPP_HIDDEN
-# define _LIBCPP_VISIBLE __declspec(dllimport)
+# define _LIBCPP_FUNC_VIS __declspec(dllimport)
+# define _LIBCPP_TYPE_VIS __declspec(dllimport)
# endif
#else
# define _LIBCPP_HIDDEN
-# define _LIBCPP_VISIBLE
+# define _LIBCPP_FUNC_VIS
+# define _LIBCPP_TYPE_VIS
#endif
#ifndef _LIBCPP_INLINE_VISIBILITY
-# if _MSC_VER
+# ifdef _MSC_VER
# define _LIBCPP_INLINE_VISIBILITY __forceinline
# else // MinGW GCC and Clang
# define _LIBCPP_INLINE_VISIBILITY __attribute__ ((__always_inline__))
@@ -121,11 +124,11 @@
#endif
#ifndef _LIBCPP_EXCEPTION_ABI
-#define _LIBCPP_EXCEPTION_ABI _LIBCPP_VISIBLE
+#define _LIBCPP_EXCEPTION_ABI _LIBCPP_TYPE_VIS
#endif
#ifndef _LIBCPP_ALWAYS_INLINE
-# if _MSC_VER
+# ifdef _MSC_VER
# define _LIBCPP_ALWAYS_INLINE __forceinline
# endif
#endif
@@ -136,8 +139,16 @@
#define _LIBCPP_HIDDEN __attribute__ ((__visibility__("hidden")))
#endif
-#ifndef _LIBCPP_VISIBLE
-#define _LIBCPP_VISIBLE __attribute__ ((__visibility__("default")))
+#ifndef _LIBCPP_FUNC_VIS
+#define _LIBCPP_FUNC_VIS __attribute__ ((__visibility__("default")))
+#endif
+
+#ifndef _LIBCPP_TYPE_VIS
+# 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_INLINE_VISIBILITY
@@ -145,7 +156,7 @@
#endif
#ifndef _LIBCPP_EXCEPTION_ABI
-#define _LIBCPP_EXCEPTION_ABI __attribute__ ((__visibility__("default")))
+#define _LIBCPP_EXCEPTION_ABI _LIBCPP_TYPE_VIS
#endif
#ifndef _LIBCPP_CANTTHROW
@@ -261,7 +272,7 @@ typedef __char32_t char32_t;
#define _LIBCPP_HAS_NO_CONSTEXPR
#endif
-#if __FreeBSD__ && (__ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L)
+#if defined(__FreeBSD__) && (__ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L)
#define _LIBCPP_HAS_QUICK_EXIT
#define _LIBCPP_HAS_C11_FEATURES
#endif
@@ -424,7 +435,7 @@ template <unsigned> struct __static_assert_check {};
#endif
#ifdef _LIBCPP_HAS_NO_STRONG_ENUMS
-#define _LIBCPP_DECLARE_STRONG_ENUM(x) struct _LIBCPP_VISIBLE x { enum __lx
+#define _LIBCPP_DECLARE_STRONG_ENUM(x) struct _LIBCPP_TYPE_VIS x { enum __lx
#define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x) \
__lx __v_; \
_LIBCPP_ALWAYS_INLINE x(__lx __v) : __v_(__v) {} \
@@ -432,7 +443,7 @@ template <unsigned> struct __static_assert_check {};
_LIBCPP_ALWAYS_INLINE operator int() const {return __v_;} \
};
#else // _LIBCPP_HAS_NO_STRONG_ENUMS
-#define _LIBCPP_DECLARE_STRONG_ENUM(x) enum class _LIBCPP_VISIBLE x
+#define _LIBCPP_DECLARE_STRONG_ENUM(x) enum class _LIBCPP_TYPE_VIS x
#define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x)
#endif // _LIBCPP_HAS_NO_STRONG_ENUMS
@@ -440,18 +451,18 @@ template <unsigned> struct __static_assert_check {};
#define _LIBCPP_EXTERN_TEMPLATE(...) extern template __VA_ARGS__;
#endif
-#if __APPLE__ || __FreeBSD__ || _WIN32 || __sun__
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(_WIN32) || defined(__sun__)
#define _LIBCPP_LOCALE__L_EXTENSIONS 1
#endif
-#if __FreeBSD__
+#ifdef __FreeBSD__
#define _DECLARE_C99_LDBL_MATH 1
#endif
-#if __APPLE__ || __FreeBSD__
+#if defined(__APPLE__) || defined(__FreeBSD__)
#define _LIBCPP_HAS_DEFAULTRUNELOCALE
#endif
-#if __APPLE__ || __FreeBSD__ || __sun__
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun__)
#define _LIBCPP_WCTYPE_IS_MASK
#endif
diff --git a/system/include/libcxx/__debug b/system/include/libcxx/__debug
index 4a0e3cec..0d631bf0 100644
--- a/system/include/libcxx/__debug
+++ b/system/include/libcxx/__debug
@@ -16,7 +16,9 @@
# include <cstdlib>
# include <cstdio>
# include <cstddef>
-# define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : (_VSTD::printf("%s\n", m), _VSTD::abort()))
+# ifndef _LIBCPP_ASSERT
+# define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : (_VSTD::printf("%s\n", m), _VSTD::abort()))
+# endif
#endif
@@ -24,9 +26,9 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-struct _LIBCPP_VISIBLE __c_node;
+struct _LIBCPP_TYPE_VIS __c_node;
-struct _LIBCPP_VISIBLE __i_node
+struct _LIBCPP_TYPE_VIS __i_node
{
void* __i_;
__i_node* __next_;
@@ -40,7 +42,7 @@ struct _LIBCPP_VISIBLE __i_node
~__i_node();
};
-struct _LIBCPP_VISIBLE __c_node
+struct _LIBCPP_TYPE_VIS __c_node
{
void* __c_;
__c_node* __next_;
@@ -117,7 +119,7 @@ _C_node<_Cont>::__subscriptable(const void* __i, ptrdiff_t __n) const
return _Cp->__subscriptable(__j, __n);
}
-class _LIBCPP_VISIBLE __libcpp_db
+class _LIBCPP_TYPE_VIS __libcpp_db
{
__c_node** __cbeg_;
__c_node** __cend_;
@@ -176,11 +178,11 @@ private:
_LIBCPP_HIDDEN
__i_node* __find_iterator(const void* __i) const;
- friend _LIBCPP_VISIBLE __libcpp_db* __get_db();
+ friend _LIBCPP_FUNC_VIS __libcpp_db* __get_db();
};
-_LIBCPP_VISIBLE __libcpp_db* __get_db();
-_LIBCPP_VISIBLE const __libcpp_db* __get_const_db();
+_LIBCPP_FUNC_VIS __libcpp_db* __get_db();
+_LIBCPP_FUNC_VIS const __libcpp_db* __get_const_db();
_LIBCPP_END_NAMESPACE_STD
diff --git a/system/include/libcxx/__functional_03 b/system/include/libcxx/__functional_03
index 3a5397d8..b52d6926 100644
--- a/system/include/libcxx/__functional_03
+++ b/system/include/libcxx/__functional_03
@@ -203,7 +203,7 @@ class _LIBCPP_EXCEPTION_ABI bad_function_call
{
};
-template<class _Fp> class _LIBCPP_VISIBLE function; // undefined
+template<class _Fp> class _LIBCPP_TYPE_VIS function; // undefined
namespace __function
{
@@ -644,7 +644,7 @@ __func<_Fp, _Alloc, _Rp(_A0, _A1, _A2)>::target_type() const
} // __function
template<class _Rp>
-class _LIBCPP_VISIBLE function<_Rp()>
+class _LIBCPP_TYPE_VIS function<_Rp()>
{
typedef __function::__base<_Rp()> __base;
aligned_storage<3*sizeof(void*)>::type __buf_;
@@ -928,7 +928,7 @@ function<_Rp()>::target() const
#endif // _LIBCPP_NO_RTTI
template<class _Rp, class _A0>
-class _LIBCPP_VISIBLE function<_Rp(_A0)>
+class _LIBCPP_TYPE_VIS function<_Rp(_A0)>
: public unary_function<_A0, _Rp>
{
typedef __function::__base<_Rp(_A0)> __base;
@@ -1230,7 +1230,7 @@ function<_Rp(_A0)>::target() const
#endif // _LIBCPP_NO_RTTI
template<class _Rp, class _A0, class _A1>
-class _LIBCPP_VISIBLE function<_Rp(_A0, _A1)>
+class _LIBCPP_TYPE_VIS function<_Rp(_A0, _A1)>
: public binary_function<_A0, _A1, _Rp>
{
typedef __function::__base<_Rp(_A0, _A1)> __base;
@@ -1532,7 +1532,7 @@ function<_Rp(_A0, _A1)>::target() const
#endif // _LIBCPP_NO_RTTI
template<class _Rp, class _A0, class _A1, class _A2>
-class _LIBCPP_VISIBLE function<_Rp(_A0, _A1, _A2)>
+class _LIBCPP_TYPE_VIS function<_Rp(_A0, _A1, _A2)>
{
typedef __function::__base<_Rp(_A0, _A1, _A2)> __base;
aligned_storage<3*sizeof(void*)>::type __buf_;
@@ -1860,11 +1860,11 @@ swap(function<_Fp>& __x, function<_Fp>& __y)
{return __x.swap(__y);}
template<class _Tp> struct __is_bind_expression : public false_type {};
-template<class _Tp> struct _LIBCPP_VISIBLE is_bind_expression
+template<class _Tp> struct _LIBCPP_TYPE_VIS is_bind_expression
: public __is_bind_expression<typename remove_cv<_Tp>::type> {};
template<class _Tp> struct __is_placeholder : public integral_constant<int, 0> {};
-template<class _Tp> struct _LIBCPP_VISIBLE is_placeholder
+template<class _Tp> struct _LIBCPP_TYPE_VIS is_placeholder
: public __is_placeholder<typename remove_cv<_Tp>::type> {};
namespace placeholders
diff --git a/system/include/libcxx/__functional_base b/system/include/libcxx/__functional_base
index 2385459c..40a63a85 100644
--- a/system/include/libcxx/__functional_base
+++ b/system/include/libcxx/__functional_base
@@ -23,21 +23,21 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Arg, class _Result>
-struct _LIBCPP_VISIBLE unary_function
+struct _LIBCPP_TYPE_VIS unary_function
{
typedef _Arg argument_type;
typedef _Result result_type;
};
template <class _Arg1, class _Arg2, class _Result>
-struct _LIBCPP_VISIBLE binary_function
+struct _LIBCPP_TYPE_VIS binary_function
{
typedef _Arg1 first_argument_type;
typedef _Arg2 second_argument_type;
typedef _Result result_type;
};
-template <class _Tp> struct _LIBCPP_VISIBLE hash;
+template <class _Tp> struct _LIBCPP_TYPE_VIS hash;
template <class _Tp>
struct __has_result_type
@@ -51,7 +51,7 @@ public:
};
template <class _Tp>
-struct _LIBCPP_VISIBLE less : binary_function<_Tp, _Tp, bool>
+struct _LIBCPP_TYPE_VIS less : binary_function<_Tp, _Tp, bool>
{
_LIBCPP_INLINE_VISIBILITY bool operator()(const _Tp& __x, const _Tp& __y) const
{return __x < __y;}
@@ -348,7 +348,7 @@ struct __invoke_return
};
template <class _Tp>
-class _LIBCPP_VISIBLE reference_wrapper
+class _LIBCPP_TYPE_VIS reference_wrapper
: public __weak_result_type<_Tp>
{
public:
diff --git a/system/include/libcxx/__functional_base_03 b/system/include/libcxx/__functional_base_03
index a1005bf7..11165a96 100644
--- a/system/include/libcxx/__functional_base_03
+++ b/system/include/libcxx/__functional_base_03
@@ -996,7 +996,7 @@ struct __invoke_return2
};
template <class _Tp>
-class _LIBCPP_VISIBLE reference_wrapper
+class _LIBCPP_TYPE_VIS reference_wrapper
: public __weak_result_type<_Tp>
{
public:
diff --git a/system/include/libcxx/__hash_table b/system/include/libcxx/__hash_table
index ba04b3e5..6f6050d3 100644
--- a/system/include/libcxx/__hash_table
+++ b/system/include/libcxx/__hash_table
@@ -26,7 +26,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-_LIBCPP_VISIBLE
+_LIBCPP_FUNC_VIS
size_t __next_prime(size_t __n);
template <class _NodePtr>
@@ -80,14 +80,14 @@ __next_pow2(size_t __n)
}
template <class _Tp, class _Hash, class _Equal, class _Alloc> class __hash_table;
-template <class _ConstNodePtr> class _LIBCPP_VISIBLE __hash_const_iterator;
-template <class _HashIterator> class _LIBCPP_VISIBLE __hash_map_iterator;
-template <class _HashIterator> class _LIBCPP_VISIBLE __hash_map_const_iterator;
+template <class _ConstNodePtr> class _LIBCPP_TYPE_VIS __hash_const_iterator;
+template <class _HashIterator> class _LIBCPP_TYPE_VIS __hash_map_iterator;
+template <class _HashIterator> class _LIBCPP_TYPE_VIS __hash_map_const_iterator;
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
- class _LIBCPP_VISIBLE unordered_map;
+ class _LIBCPP_TYPE_VIS unordered_map;
template <class _NodePtr>
-class _LIBCPP_VISIBLE __hash_iterator
+class _LIBCPP_TYPE_VIS __hash_iterator
{
typedef _NodePtr __node_pointer;
@@ -142,14 +142,14 @@ private:
{}
template <class, class, class, class> friend class __hash_table;
- template <class> friend class _LIBCPP_VISIBLE __hash_const_iterator;
- template <class> friend class _LIBCPP_VISIBLE __hash_map_iterator;
- template <class, class, class, class, class> friend class _LIBCPP_VISIBLE unordered_map;
- template <class, class, class, class, class> friend class _LIBCPP_VISIBLE unordered_multimap;
+ template <class> friend class _LIBCPP_TYPE_VIS __hash_const_iterator;
+ template <class> friend class _LIBCPP_TYPE_VIS __hash_map_iterator;
+ template <class, class, class, class, class> friend class _LIBCPP_TYPE_VIS unordered_map;
+ template <class, class, class, class, class> friend class _LIBCPP_TYPE_VIS unordered_multimap;
};
template <class _ConstNodePtr>
-class _LIBCPP_VISIBLE __hash_const_iterator
+class _LIBCPP_TYPE_VIS __hash_const_iterator
{
typedef _ConstNodePtr __node_pointer;
@@ -220,15 +220,15 @@ private:
{}
template <class, class, class, class> friend class __hash_table;
- template <class> friend class _LIBCPP_VISIBLE __hash_map_const_iterator;
- template <class, class, class, class, class> friend class _LIBCPP_VISIBLE unordered_map;
- template <class, class, class, class, class> friend class _LIBCPP_VISIBLE unordered_multimap;
+ template <class> friend class _LIBCPP_TYPE_VIS __hash_map_const_iterator;
+ template <class, class, class, class, class> friend class _LIBCPP_TYPE_VIS unordered_map;
+ template <class, class,