libcxx: update to LLVM 18
release/18.x branch, commit 78b99c73ee4b96fe9ce0e294d4632326afb2db42 This adds the flag `-D_LIBCPP_HARDENING_MODE` which is determined based on the Zig optimization mode. This commit also fixes libunwind, libcxx, and libcxxabi to properly report sub compilation errors.
This commit is contained in:
@@ -24,6 +24,9 @@
|
||||
# pragma GCC system_header
|
||||
#endif
|
||||
|
||||
_LIBCPP_PUSH_MACROS
|
||||
#include <__undef_macros>
|
||||
|
||||
#if _LIBCPP_STD_VER >= 20
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
@@ -36,7 +39,7 @@ struct __fn {
|
||||
indirect_binary_predicate<ranges::equal_to, projected<_Iter, _Proj>, const _Type1*>
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr _Iter operator()(
|
||||
_Iter __first, _Sent __last, const _Type1& __old_value, const _Type2& __new_value, _Proj __proj = {}) const {
|
||||
auto __pred = [&](const auto& __val) { return __val == __old_value; };
|
||||
auto __pred = [&](const auto& __val) -> bool { return __val == __old_value; };
|
||||
return ranges::__replace_if_impl(std::move(__first), std::move(__last), __pred, __new_value, __proj);
|
||||
}
|
||||
|
||||
@@ -45,7 +48,7 @@ struct __fn {
|
||||
indirect_binary_predicate<ranges::equal_to, projected<iterator_t<_Range>, _Proj>, const _Type1*>
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr borrowed_iterator_t<_Range>
|
||||
operator()(_Range&& __range, const _Type1& __old_value, const _Type2& __new_value, _Proj __proj = {}) const {
|
||||
auto __pred = [&](auto&& __val) { return __val == __old_value; };
|
||||
auto __pred = [&](auto&& __val) -> bool { return __val == __old_value; };
|
||||
return ranges::__replace_if_impl(ranges::begin(__range), ranges::end(__range), __pred, __new_value, __proj);
|
||||
}
|
||||
};
|
||||
@@ -60,4 +63,6 @@ _LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
#endif // _LIBCPP_STD_VER >= 20
|
||||
|
||||
_LIBCPP_POP_MACROS
|
||||
|
||||
#endif // _LIBCPP___ALGORITHM_RANGES_REPLACE_H
|
||||
|
||||
Reference in New Issue
Block a user