aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/cxxsupp/libcxx/src
diff options
context:
space:
mode:
authormikhnenko <mikhnenko@yandex-team.com>2023-10-06 17:52:32 +0300
committermikhnenko <mikhnenko@yandex-team.com>2023-10-06 20:37:34 +0300
commit5ae8a1d5a335e8842ec7d738b63084ff9e859d91 (patch)
treef78e50dd87826dbfa0e105524e7712de898e0168 /contrib/libs/cxxsupp/libcxx/src
parentabce6653da14c738a48f8703314aa8ad569e5bf9 (diff)
downloadydb-5ae8a1d5a335e8842ec7d738b63084ff9e859d91.tar.gz
Upd libc++ to 95a2527261443729a398e16bc7dc6dd325fc2691 (29 Mar 2022)
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/src')
-rw-r--r--contrib/libs/cxxsupp/libcxx/src/assert.cpp24
-rw-r--r--contrib/libs/cxxsupp/libcxx/src/filesystem/filesystem_common.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/src/random.cpp2
3 files changed, 6 insertions, 22 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/src/assert.cpp b/contrib/libs/cxxsupp/libcxx/src/assert.cpp
index 21a3863cd05..54459800728 100644
--- a/contrib/libs/cxxsupp/libcxx/src/assert.cpp
+++ b/contrib/libs/cxxsupp/libcxx/src/assert.cpp
@@ -10,29 +10,13 @@
#include <__config>
#include <cstdio>
#include <cstdlib>
-#include <string>
_LIBCPP_BEGIN_NAMESPACE_STD
-std::string __libcpp_debug_info::what() const {
- string msg = __file_;
- msg += ":" + std::to_string(__line_) + ": _LIBCPP_ASSERT '";
- msg += __pred_;
- msg += "' failed. ";
- msg += __msg_;
- return msg;
-}
-
-_LIBCPP_NORETURN void __libcpp_abort_debug_function(__libcpp_debug_info const& info) {
- std::fprintf(stderr, "%s\n", info.what().c_str());
- std::abort();
-}
-
-_LIBCPP_CONSTINIT __libcpp_debug_function_type __libcpp_debug_function = __libcpp_abort_debug_function;
-
-bool __libcpp_set_debug_function(__libcpp_debug_function_type __func) {
- __libcpp_debug_function = __func;
- return true;
+_LIBCPP_WEAK
+void __libcpp_assertion_handler(char const* __file, int __line, char const* __expression, char const* __message) {
+ std::fprintf(stderr, "%s:%d: libc++ assertion '%s' failed. %s\n", __file, __line, __expression, __message);
+ std::abort();
}
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/src/filesystem/filesystem_common.h b/contrib/libs/cxxsupp/libcxx/src/filesystem/filesystem_common.h
index 13f9e0f4c9a..26130d71ab3 100644
--- a/contrib/libs/cxxsupp/libcxx/src/filesystem/filesystem_common.h
+++ b/contrib/libs/cxxsupp/libcxx/src/filesystem/filesystem_common.h
@@ -111,7 +111,7 @@ format_string(const char* msg, ...) {
}
error_code capture_errno() {
- _LIBCPP_ASSERT(errno, "Expected errno to be non-zero");
+ _LIBCPP_ASSERT(errno != 0, "Expected errno to be non-zero");
return error_code(errno, generic_category());
}
diff --git a/contrib/libs/cxxsupp/libcxx/src/random.cpp b/contrib/libs/cxxsupp/libcxx/src/random.cpp
index 466b0157722..38732462cf5 100644
--- a/contrib/libs/cxxsupp/libcxx/src/random.cpp
+++ b/contrib/libs/cxxsupp/libcxx/src/random.cpp
@@ -210,7 +210,7 @@ random_device::entropy() const noexcept
return std::numeric_limits<result_type>::digits;
return ent;
-#elif defined(__OpenBSD__) || defined(_LIBCPP_USING_FUCHSIA_CPRNG)
+#elif defined(_LIBCPP_USING_ARC4_RANDOM) || defined(_LIBCPP_USING_FUCHSIA_CPRNG)
return std::numeric_limits<result_type>::digits;
#else
return 0;