diff options
author | dim <dim@FreeBSD.org> | 2016-05-26 18:52:49 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2016-05-26 18:52:49 +0000 |
commit | 6a450d405601a2fe1ac4163596a9f1f097938a67 (patch) | |
tree | 87163f0ca4abe85acc120b605dcfa6b9c46b29cd /contrib/libc++/src | |
parent | 934ebc933e3692b4690e2a19f92d402a4d7ac84a (diff) | |
parent | fb2ca4532fddc71eec8c0229d53a0b1de52d5af8 (diff) | |
download | FreeBSD-src-6a450d405601a2fe1ac4163596a9f1f097938a67.zip FreeBSD-src-6a450d405601a2fe1ac4163596a9f1f097938a67.tar.gz |
Update libc++ to 3.8.0. Excerpted list of fixes (with upstream revision
numbers):
r242679 Implement the plugin-based version of std::search. There are no
searchers yet; those are coming soon.
r242682 Implement the default searcher for std::experimental::search.
r243728 Add <experimental/any> v2.
r245330 implement more of N4258 - Cleaning up noexcept in the standard
library. Specifically add new noexcept stuff to vector and
string's move-assignment operations
r245334 Fix PR22606 - Leak pthread_key with static storage duration to
ensure all of thread-local destructors are called.
r245335 Fix PR23589: std::function doesn't recognize null pointer to
varargs function.
r247036 Implementation of Boyer-Moore and Boyer-Moore-Horspool
searchers for the LFTS.
r249325 Implement LWG#2063, and update the issues links to point to the
github generated pages
r249738 Split <ctype.h> out of <cctype>.
r249739 Split <errno.h> out of <cerrno>.
r249740 Split <float.h> out of <cfloat>.
r249741 Split <inttypes.h> out of <cinttypes>.
r249742 Split <math.h> out of <cmath>.
r249743 Split <setjmp.h> out of <csetjmp>.
r249761 Split <stddef.h> out of <cstddef>.
r249798 Split <stdio.h> out of <cstdio>.
r249800 Split <stdlib.h> out of <cstdlib>.
r249889 Split <wchar.h> out of <cwchar>.
r249890 Split <wctype.h> out of <cwctype>.
r249929 Split <string.h> out of <cstring>.
r250254 ABI versioning macros for libc++.
r251246 Fix LWG#2244: basic_istream::seekg
r251247 Fix LWG#2127: Move-construction with raw_storage_iterator.
r251253 Fix LWG#2476: scoped_allocator_adaptor is not assignable
r251257 Fix LWG#2489: mem_fn() should be noexcept
r251618 Implement P0004R1 'Remove Deprecated iostreams aliases'
r251766 Implement the first part of P0006R0: Adopt Type Traits Variable
Templates for C++17.
r252195 Implement P0092R1 for C++1z
r252350 Allow deque to handle incomplete types.
r252406 More of P0006R0: type traits variable aliases for C++17.
r252407 Implement LWG#2353: std::next is over-constrained
r252905 Implement P0074: Making owner_less more flexible
r253215 Implement P0013R1: Logical Operator Type Traits.
r253274 Implement P0007: Constant View: A proposal for a std::as_const
helper function template.
r254119 Add static_assert to set/multiset/map/multimap/forward_list/deque
that the allocator's value_type match the container's value_type.
r254283 Implement more of P0006; Type Traits Variable Templates.
r255941 LWG2485: get() should be overloaded for const tuple&&.
r256325 Fix LWG Issue #2367 - Fixing std::tuple and std::pair's default
constructors.
r256652 Fix for ALL undefined behavior in <list>.
r256859 First half of LWG#2354: 'Unnecessary copying when inserting
into maps with braced-init syntax'
Exp-run: antoine
Relnotes: yes
Diffstat (limited to 'contrib/libc++/src')
-rw-r--r-- | contrib/libc++/src/any.cpp | 18 | ||||
-rw-r--r-- | contrib/libc++/src/exception.cpp | 10 | ||||
-rw-r--r-- | contrib/libc++/src/future.cpp | 2 | ||||
-rw-r--r-- | contrib/libc++/src/include/atomic_support.h (renamed from contrib/libc++/src/support/atomic_support.h) | 9 | ||||
-rw-r--r-- | contrib/libc++/src/include/config_elast.h (renamed from contrib/libc++/src/config_elast.h) | 0 | ||||
-rw-r--r-- | contrib/libc++/src/ios.cpp | 4 | ||||
-rw-r--r-- | contrib/libc++/src/locale.cpp | 20 | ||||
-rw-r--r-- | contrib/libc++/src/memory.cpp | 6 | ||||
-rw-r--r-- | contrib/libc++/src/mutex.cpp | 2 | ||||
-rw-r--r-- | contrib/libc++/src/new.cpp | 10 | ||||
-rw-r--r-- | contrib/libc++/src/stdexcept.cpp | 6 | ||||
-rw-r--r-- | contrib/libc++/src/system_error.cpp | 2 | ||||
-rw-r--r-- | contrib/libc++/src/typeinfo.cpp | 9 |
13 files changed, 57 insertions, 41 deletions
diff --git a/contrib/libc++/src/any.cpp b/contrib/libc++/src/any.cpp new file mode 100644 index 0000000..f776845 --- /dev/null +++ b/contrib/libc++/src/any.cpp @@ -0,0 +1,18 @@ +//===---------------------------- any.cpp ---------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "experimental/any" + +_LIBCPP_BEGIN_NAMESPACE_LFTS + +const char* bad_any_cast::what() const _NOEXCEPT { + return "bad any cast"; +} + +_LIBCPP_END_NAMESPACE_LFTS diff --git a/contrib/libc++/src/exception.cpp b/contrib/libc++/src/exception.cpp index 2c16060..e172f64 100644 --- a/contrib/libc++/src/exception.cpp +++ b/contrib/libc++/src/exception.cpp @@ -12,10 +12,6 @@ #include "exception" #include "new" -#ifndef __has_include -#define __has_include(inc) 0 -#endif - #if defined(__APPLE__) && !defined(LIBCXXRT) #include <cxxabi.h> @@ -29,16 +25,16 @@ #define __terminate_handler __cxxabiapple::__cxa_terminate_handler #define __unexpected_handler __cxxabiapple::__cxa_unexpected_handler #endif // _LIBCPPABI_VERSION -#elif defined(LIBCXXRT) || defined(LIBCXX_BUILDING_LIBCXXABI) || __has_include(<cxxabi.h>) +#elif defined(LIBCXXRT) || defined(LIBCXX_BUILDING_LIBCXXABI) #include <cxxabi.h> using namespace __cxxabiv1; #if defined(LIBCXXRT) || defined(_LIBCPPABI_VERSION) #define HAVE_DEPENDENT_EH_ABI 1 #endif -#elif !defined(__GLIBCXX__) // __has_include(<cxxabi.h>) +#elif !defined(__GLIBCXX__) // defined(LIBCXX_BUILDING_LIBCXXABI) static std::terminate_handler __terminate_handler; static std::unexpected_handler __unexpected_handler; -#endif // __has_include(<cxxabi.h>) +#endif // defined(LIBCXX_BUILDING_LIBCXXABI) namespace std { diff --git a/contrib/libc++/src/future.cpp b/contrib/libc++/src/future.cpp index 3132b18..e1758f3 100644 --- a/contrib/libc++/src/future.cpp +++ b/contrib/libc++/src/future.cpp @@ -221,10 +221,12 @@ promise<void>::~promise() { if (__state_) { +#ifndef _LIBCPP_NO_EXCEPTIONS if (!__state_->__has_value() && __state_->use_count() > 1) __state_->set_exception(make_exception_ptr( future_error(make_error_code(future_errc::broken_promise)) )); +#endif // _LIBCPP_NO_EXCEPTIONS __state_->__release_shared(); } } diff --git a/contrib/libc++/src/support/atomic_support.h b/contrib/libc++/src/include/atomic_support.h index dbf3b9c..8b719c5 100644 --- a/contrib/libc++/src/support/atomic_support.h +++ b/contrib/libc++/src/include/atomic_support.h @@ -1,3 +1,12 @@ +//===----------------------------------------------------------------------===//// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===//// + #ifndef ATOMIC_SUPPORT_H #define ATOMIC_SUPPORT_H diff --git a/contrib/libc++/src/config_elast.h b/contrib/libc++/src/include/config_elast.h index 9d6a76b..9d6a76b 100644 --- a/contrib/libc++/src/config_elast.h +++ b/contrib/libc++/src/include/config_elast.h diff --git a/contrib/libc++/src/ios.cpp b/contrib/libc++/src/ios.cpp index 90972c4..23e3ee0 100644 --- a/contrib/libc++/src/ios.cpp +++ b/contrib/libc++/src/ios.cpp @@ -15,7 +15,7 @@ #include "__locale" #include "algorithm" -#include "config_elast.h" +#include "include/config_elast.h" #include "istream" #include "limits" #include "memory" @@ -152,7 +152,7 @@ ios_base::getloc() const } // xalloc -#if __has_feature(cxx_atomic) && !defined(_LIBCPP_HAS_NO_THREADS) +#if defined(_LIBCPP_HAS_C_ATOMIC_IMP) && !defined(_LIBCPP_HAS_NO_THREADS) atomic<int> ios_base::__xindex_ = ATOMIC_VAR_INIT(0); #else int ios_base::__xindex_ = 0; diff --git a/contrib/libc++/src/locale.cpp b/contrib/libc++/src/locale.cpp index bdc73e1..6b04e78 100644 --- a/contrib/libc++/src/locale.cpp +++ b/contrib/libc++/src/locale.cpp @@ -812,7 +812,8 @@ ctype<wchar_t>::do_toupper(char_type c) const { #ifdef _LIBCPP_HAS_DEFAULTRUNELOCALE return isascii(c) ? _DefaultRuneLocale.__mapupper[c] : c; -#elif defined(__GLIBC__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__) +#elif defined(__GLIBC__) || defined(__EMSCRIPTEN__) || \ + defined(__NetBSD__) return isascii(c) ? ctype<char>::__classic_upper_table()[c] : c; #else return (isascii(c) && iswlower_l(c, _LIBCPP_GET_C_LOCALE)) ? c-L'a'+L'A' : c; @@ -825,7 +826,8 @@ ctype<wchar_t>::do_toupper(char_type* low, const char_type* high) const for (; low != high; ++low) #ifdef _LIBCPP_HAS_DEFAULTRUNELOCALE *low = isascii(*low) ? _DefaultRuneLocale.__mapupper[*low] : *low; -#elif defined(__GLIBC__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__) +#elif defined(__GLIBC__) || defined(__EMSCRIPTEN__) || \ + defined(__NetBSD__) *low = isascii(*low) ? ctype<char>::__classic_upper_table()[*low] : *low; #else @@ -839,7 +841,8 @@ ctype<wchar_t>::do_tolower(char_type c) const { #ifdef _LIBCPP_HAS_DEFAULTRUNELOCALE return isascii(c) ? _DefaultRuneLocale.__maplower[c] : c; -#elif defined(__GLIBC__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__) +#elif defined(__GLIBC__) || defined(__EMSCRIPTEN__) || \ + defined(__NetBSD__) return isascii(c) ? ctype<char>::__classic_lower_table()[c] : c; #else return (isascii(c) && isupper_l(c, _LIBCPP_GET_C_LOCALE)) ? c-L'A'+'a' : c; @@ -852,7 +855,8 @@ ctype<wchar_t>::do_tolower(char_type* low, const char_type* high) const for (; low != high; ++low) #ifdef _LIBCPP_HAS_DEFAULTRUNELOCALE *low = isascii(*low) ? _DefaultRuneLocale.__maplower[*low] : *low; -#elif defined(__GLIBC__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__) +#elif defined(__GLIBC__) || defined(__EMSCRIPTEN__) || \ + defined(__NetBSD__) *low = isascii(*low) ? ctype<char>::__classic_lower_table()[*low] : *low; #else @@ -922,7 +926,7 @@ ctype<char>::do_toupper(char_type c) const #elif defined(__NetBSD__) return static_cast<char>(__classic_upper_table()[static_cast<unsigned char>(c)]); #elif defined(__GLIBC__) || defined(__EMSCRIPTEN__) - return isascii(c) ? + return isascii(c) ? static_cast<char>(__classic_upper_table()[static_cast<unsigned char>(c)]) : c; #else return (isascii(c) && islower_l(c, _LIBCPP_GET_C_LOCALE)) ? c-'a'+'A' : c; @@ -955,7 +959,7 @@ ctype<char>::do_tolower(char_type c) const static_cast<char>(_DefaultRuneLocale.__maplower[static_cast<ptrdiff_t>(c)]) : c; #elif defined(__NetBSD__) return static_cast<char>(__classic_lower_table()[static_cast<unsigned char>(c)]); -#elif defined(__GLIBC__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__) +#elif defined(__GLIBC__) || defined(__EMSCRIPTEN__) return isascii(c) ? static_cast<char>(__classic_lower_table()[static_cast<size_t>(c)]) : c; #else @@ -1012,7 +1016,7 @@ ctype<char>::do_narrow(const char_type* low, const char_type* high, char dfault, return low; } -#ifdef __EMSCRIPTEN__ +#if defined(__EMSCRIPTEN__) extern "C" const unsigned short ** __ctype_b_loc(); extern "C" const int ** __ctype_tolower_loc(); extern "C" const int ** __ctype_toupper_loc(); @@ -1169,7 +1173,7 @@ ctype<char>::__classic_upper_table() _NOEXCEPT { return *__ctype_toupper_loc(); } -#endif // __GLIBC__ || __EMSCRIPTEN__ || __NETBSD__ +#endif // __GLIBC__ || __NETBSD__ || __EMSCRIPTEN__ // template <> class ctype_byname<char> diff --git a/contrib/libc++/src/memory.cpp b/contrib/libc++/src/memory.cpp index 66fb143..5b81f26 100644 --- a/contrib/libc++/src/memory.cpp +++ b/contrib/libc++/src/memory.cpp @@ -13,7 +13,7 @@ #include "mutex" #include "thread" #endif -#include "support/atomic_support.h" +#include "include/atomic_support.h" _LIBCPP_BEGIN_NAMESPACE_STD @@ -124,7 +124,7 @@ __shared_weak_count::__get_deleter(const type_info&) const _NOEXCEPT #endif // _LIBCPP_NO_RTTI -#if __has_feature(cxx_atomic) && !defined(_LIBCPP_HAS_NO_THREADS) +#if defined(_LIBCPP_HAS_C_ATOMIC_IMP) && !defined(_LIBCPP_HAS_NO_THREADS) static const std::size_t __sp_mut_count = 16; static pthread_mutex_t mut_back_imp[__sp_mut_count] = @@ -177,7 +177,7 @@ __get_sp_mut(const void* p) return muts[hash<const void*>()(p) & (__sp_mut_count-1)]; } -#endif // __has_feature(cxx_atomic) && !_LIBCPP_HAS_NO_THREADS +#endif // defined(_LIBCPP_HAS_C_ATOMIC_IMP) && !defined(_LIBCPP_HAS_NO_THREADS) void declare_reachable(void*) diff --git a/contrib/libc++/src/mutex.cpp b/contrib/libc++/src/mutex.cpp index 5f8ba0a..127e67a 100644 --- a/contrib/libc++/src/mutex.cpp +++ b/contrib/libc++/src/mutex.cpp @@ -12,7 +12,7 @@ #include "limits" #include "system_error" #include "cassert" -#include "support/atomic_support.h" +#include "include/atomic_support.h" _LIBCPP_BEGIN_NAMESPACE_STD #ifndef _LIBCPP_HAS_NO_THREADS diff --git a/contrib/libc++/src/new.cpp b/contrib/libc++/src/new.cpp index c28fcb5..f4f73d8 100644 --- a/contrib/libc++/src/new.cpp +++ b/contrib/libc++/src/new.cpp @@ -13,10 +13,6 @@ #include "new" -#ifndef __has_include -#define __has_include(inc) 0 -#endif - #if defined(__APPLE__) && !defined(LIBCXXRT) #include <cxxabi.h> @@ -27,9 +23,9 @@ #define __new_handler __cxxabiapple::__cxa_new_handler #endif #else // __APPLE__ - #if defined(LIBCXXRT) || __has_include(<cxxabi.h>) + #if defined(LIBCXXRT) || defined(LIBCXX_BUILDING_LIBCXXABI) #include <cxxabi.h> - #endif // __has_include(<cxxabi.h>) + #endif // defined(LIBCXX_BUILDING_LIBCXXABI) #if !defined(_LIBCPPABI_VERSION) && !defined(__GLIBCXX__) static std::new_handler __new_handler; #endif // _LIBCPPABI_VERSION @@ -38,7 +34,7 @@ #ifndef __GLIBCXX__ // Implement all new and delete operators as weak definitions -// in this shared library, so that they can be overriden by programs +// in this shared library, so that they can be overridden by programs // that define non-weak copies of the functions. _LIBCPP_WEAK _LIBCPP_NEW_DELETE_VIS diff --git a/contrib/libc++/src/stdexcept.cpp b/contrib/libc++/src/stdexcept.cpp index aff4b18..0a08bfe 100644 --- a/contrib/libc++/src/stdexcept.cpp +++ b/contrib/libc++/src/stdexcept.cpp @@ -13,12 +13,8 @@ #include "string" #include "system_error" -#ifndef __has_include -#define __has_include(inc) 0 -#endif - /* For _LIBCPPABI_VERSION */ -#if __has_include(<cxxabi.h>) || defined(__APPLE_) || defined(LIBCXXRT) +#if defined(LIBCXX_BUILDING_LIBCXXABI) || defined(__APPLE__) || defined(LIBCXXRT) #include <cxxabi.h> #endif diff --git a/contrib/libc++/src/system_error.cpp b/contrib/libc++/src/system_error.cpp index 18f668f..3023e20 100644 --- a/contrib/libc++/src/system_error.cpp +++ b/contrib/libc++/src/system_error.cpp @@ -12,7 +12,7 @@ #define _LIBCPP_BUILDING_SYSTEM_ERROR #include "system_error" -#include "config_elast.h" +#include "include/config_elast.h" #include "cstring" #include "string" diff --git a/contrib/libc++/src/typeinfo.cpp b/contrib/libc++/src/typeinfo.cpp index b428120..5c0a609 100644 --- a/contrib/libc++/src/typeinfo.cpp +++ b/contrib/libc++/src/typeinfo.cpp @@ -8,13 +8,8 @@ //===----------------------------------------------------------------------===// #include <stdlib.h> -#ifndef __has_include -#define __has_include(inc) 0 -#endif - -#ifdef __APPLE__ -#include <cxxabi.h> -#elif defined(LIBCXXRT) || __has_include(<cxxabi.h>) +#if defined(__APPLE__) || defined(LIBCXXRT) || \ + defined(LIBCXX_BUILDING_LIBCXXABI) #include <cxxabi.h> #endif |