libcxx: update to LLVM 17

release/17.x branch, commit 8f4dd44097c9ae25dd203d5ac87f3b48f854bba8

This adds the flag `-D_LIBCPP_PSTL_CPU_BACKEND_SERIAL`. A future
enhancement could possibly pass something different if there is a
compelling parallel implementation. That libdispatch one might be worth
looking into.
This commit is contained in:
Andrew Kelley
2023-08-11 17:34:16 -07:00
parent 9ddfacd8e6
commit 5d4439cc3e
940 changed files with 46811 additions and 22346 deletions

View File

@@ -12,7 +12,6 @@
#include <cstdlib>
#include <limits>
#include <stdexcept>
#include <stdio.h>
#include <string>
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
@@ -61,22 +60,12 @@ template string operator+<char, char_traits<char>, allocator<char>>(char const*,
namespace
{
template<typename T>
inline void throw_helper(const string& msg) {
#ifndef _LIBCPP_NO_EXCEPTIONS
throw T(msg);
#else
fprintf(stderr, "%s\n", msg.c_str());
_VSTD::abort();
#endif
}
inline void throw_from_string_out_of_range(const string& func) {
throw_helper<out_of_range>(func + ": out of range");
std::__throw_out_of_range((func + ": out of range").c_str());
}
inline void throw_from_string_invalid_arg(const string& func) {
throw_helper<invalid_argument>(func + ": no conversion");
std::__throw_invalid_argument((func + ": no conversion").c_str());
}
// as_integer
@@ -357,7 +346,7 @@ S i_to_string(V v) {
constexpr size_t bufsize = numeric_limits<V>::digits10 + 2; // +1 for minus, +1 for digits10
char buf[bufsize];
const auto res = to_chars(buf, buf + bufsize, v);
_LIBCPP_ASSERT(res.ec == errc(), "bufsize must be large enough to accomodate the value");
_LIBCPP_ASSERT_INTERNAL(res.ec == errc(), "bufsize must be large enough to accomodate the value");
return S(buf, res.ptr);
}