mirror of
https://github.com/ziglang/zig.git
synced 2026-10-14 10:27:43 -04:00
libcxx: Update to LLVM 19.
* Moved the tz.cpp patch to experimental/tzdb.cpp. * Extended the __config_site patch to a few more files.
This commit is contained in:
1 parent
d13bc04cb4
commit
1c8f0b8909
666 files changed
+20750
-15554
No files matched your search
Vendored
+39
-28
@@ -791,8 +791,7 @@ typedef regex_token_iterator<wstring::const_iterator> wsregex_token_iterator;
|
||||
|
||||
#include <__algorithm/find.h>
|
||||
#include <__algorithm/search.h>
|
||||
#include <__assert> // all public C++ headers provide the assertion handler
|
||||
#include <__availability>
|
||||
#include <__assert>
|
||||
#include <__config>
|
||||
#include <__iterator/back_insert_iterator.h>
|
||||
#include <__iterator/default_sentinel.h>
|
||||
@@ -1346,13 +1345,12 @@ struct __state {
|
||||
|
||||
template <class _CharT>
|
||||
class __node {
|
||||
__node(const __node&);
|
||||
__node& operator=(const __node&);
|
||||
|
||||
public:
|
||||
typedef std::__state<_CharT> __state;
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI __node() {}
|
||||
__node(const __node&) = delete;
|
||||
__node& operator=(const __node&) = delete;
|
||||
_LIBCPP_HIDE_FROM_ABI_VIRTUAL
|
||||
virtual ~__node() {}
|
||||
|
||||
@@ -1953,14 +1951,14 @@ class __match_char : public __owns_one_state<_CharT> {
|
||||
|
||||
_CharT __c_;
|
||||
|
||||
__match_char(const __match_char&);
|
||||
__match_char& operator=(const __match_char&);
|
||||
|
||||
public:
|
||||
typedef std::__state<_CharT> __state;
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI __match_char(_CharT __c, __node<_CharT>* __s) : base(__s), __c_(__c) {}
|
||||
|
||||
__match_char(const __match_char&) = delete;
|
||||
__match_char& operator=(const __match_char&) = delete;
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI_VIRTUAL virtual void __exec(__state&) const;
|
||||
};
|
||||
|
||||
@@ -1985,15 +1983,15 @@ class __match_char_icase : public __owns_one_state<_CharT> {
|
||||
_Traits __traits_;
|
||||
_CharT __c_;
|
||||
|
||||
__match_char_icase(const __match_char_icase&);
|
||||
__match_char_icase& operator=(const __match_char_icase&);
|
||||
|
||||
public:
|
||||
typedef std::__state<_CharT> __state;
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI __match_char_icase(const _Traits& __traits, _CharT __c, __node<_CharT>* __s)
|
||||
: base(__s), __traits_(__traits), __c_(__traits.translate_nocase(__c)) {}
|
||||
|
||||
__match_char_icase(const __match_char_icase&) = delete;
|
||||
__match_char_icase& operator=(const __match_char_icase&) = delete;
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI_VIRTUAL virtual void __exec(__state&) const;
|
||||
};
|
||||
|
||||
@@ -2018,15 +2016,15 @@ class __match_char_collate : public __owns_one_state<_CharT> {
|
||||
_Traits __traits_;
|
||||
_CharT __c_;
|
||||
|
||||
__match_char_collate(const __match_char_collate&);
|
||||
__match_char_collate& operator=(const __match_char_collate&);
|
||||
|
||||
public:
|
||||
typedef std::__state<_CharT> __state;
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI __match_char_collate(const _Traits& __traits, _CharT __c, __node<_CharT>* __s)
|
||||
: base(__s), __traits_(__traits), __c_(__traits.translate(__c)) {}
|
||||
|
||||
__match_char_collate(const __match_char_collate&) = delete;
|
||||
__match_char_collate& operator=(const __match_char_collate&) = delete;
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI_VIRTUAL virtual void __exec(__state&) const;
|
||||
};
|
||||
|
||||
@@ -2062,9 +2060,6 @@ class __bracket_expression : public __owns_one_state<_CharT> {
|
||||
bool __collate_;
|
||||
bool __might_have_digraph_;
|
||||
|
||||
__bracket_expression(const __bracket_expression&);
|
||||
__bracket_expression& operator=(const __bracket_expression&);
|
||||
|
||||
public:
|
||||
typedef std::__state<_CharT> __state;
|
||||
|
||||
@@ -2079,6 +2074,9 @@ public:
|
||||
__collate_(__collate),
|
||||
__might_have_digraph_(__traits_.getloc().name() != "C") {}
|
||||
|
||||
__bracket_expression(const __bracket_expression&) = delete;
|
||||
__bracket_expression& operator=(const __bracket_expression&) = delete;
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI_VIRTUAL virtual void __exec(__state&) const;
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI bool __negated() const { return __negate_; }
|
||||
@@ -2700,9 +2698,6 @@ class __lookahead : public __owns_one_state<_CharT> {
|
||||
unsigned __mexp_;
|
||||
bool __invert_;
|
||||
|
||||
__lookahead(const __lookahead&);
|
||||
__lookahead& operator=(const __lookahead&);
|
||||
|
||||
public:
|
||||
typedef std::__state<_CharT> __state;
|
||||
|
||||
@@ -2710,6 +2705,9 @@ public:
|
||||
__lookahead(const basic_regex<_CharT, _Traits>& __exp, bool __invert, __node<_CharT>* __s, unsigned __mexp)
|
||||
: base(__s), __exp_(__exp), __mexp_(__mexp), __invert_(__invert) {}
|
||||
|
||||
__lookahead(const __lookahead&) = delete;
|
||||
__lookahead& operator=(const __lookahead&) = delete;
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI_VIRTUAL virtual void __exec(__state&) const;
|
||||
};
|
||||
|
||||
@@ -4215,11 +4213,7 @@ public:
|
||||
_LIBCPP_HIDE_FROM_ABI int compare(const string_type& __s) const { return str().compare(__s); }
|
||||
_LIBCPP_HIDE_FROM_ABI int compare(const value_type* __s) const { return str().compare(__s); }
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI void swap(sub_match& __s)
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
_NOEXCEPT(__is_nothrow_swappable<_BidirectionalIterator>::value)
|
||||
#endif // _LIBCPP_CXX03_LANG
|
||||
{
|
||||
_LIBCPP_HIDE_FROM_ABI void swap(sub_match& __s) _NOEXCEPT_(__is_nothrow_swappable_v<_BidirectionalIterator>) {
|
||||
this->pair<_BidirectionalIterator, _BidirectionalIterator>::swap(__s);
|
||||
std::swap(matched, __s.matched);
|
||||
}
|
||||
@@ -4583,7 +4577,7 @@ public:
|
||||
// size:
|
||||
_LIBCPP_HIDE_FROM_ABI size_type size() const _NOEXCEPT { return __matches_.size(); }
|
||||
_LIBCPP_HIDE_FROM_ABI size_type max_size() const _NOEXCEPT { return __matches_.max_size(); }
|
||||
_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI bool empty() const _NOEXCEPT { return size() == 0; }
|
||||
_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI bool empty() const _NOEXCEPT { return size() == 0; }
|
||||
|
||||
// element access:
|
||||
_LIBCPP_HIDE_FROM_ABI difference_type length(size_type __sub = 0) const {
|
||||
@@ -4701,6 +4695,9 @@ private:
|
||||
|
||||
template <class, class>
|
||||
friend class __lookahead;
|
||||
|
||||
template <class, class, class>
|
||||
friend class regex_iterator;
|
||||
};
|
||||
|
||||
template <class _BidirectionalIterator, class _Allocator>
|
||||
@@ -5411,7 +5408,9 @@ template <class _BidirectionalIterator, class _CharT, class _Traits>
|
||||
regex_iterator<_BidirectionalIterator, _CharT, _Traits>&
|
||||
regex_iterator<_BidirectionalIterator, _CharT, _Traits>::operator++() {
|
||||
__flags_ |= regex_constants::__no_update_pos;
|
||||
_BidirectionalIterator __start = __match_[0].second;
|
||||
_BidirectionalIterator __start = __match_[0].second;
|
||||
_BidirectionalIterator __prefix_start = __start;
|
||||
|
||||
if (__match_[0].first == __match_[0].second) {
|
||||
if (__start == __end_) {
|
||||
__match_ = value_type();
|
||||
@@ -5425,9 +5424,21 @@ regex_iterator<_BidirectionalIterator, _CharT, _Traits>::operator++() {
|
||||
else
|
||||
++__start;
|
||||
}
|
||||
|
||||
__flags_ |= regex_constants::match_prev_avail;
|
||||
if (!std::regex_search(__start, __end_, __match_, *__pregex_, __flags_))
|
||||
if (!std::regex_search(__start, __end_, __match_, *__pregex_, __flags_)) {
|
||||
__match_ = value_type();
|
||||
|
||||
} else {
|
||||
// The Standard mandates that if `regex_search` returns true ([re.regiter.incr]), "`match.prefix().first` shall be
|
||||
// equal to the previous value of `match[0].second`... It is unspecified how the implementation makes these
|
||||
// adjustments." The adjustment is necessary if we incremented `__start` above (the branch that deals with
|
||||
// zero-length matches).
|
||||
auto& __prefix = __match_.__prefix_;
|
||||
__prefix.first = __prefix_start;
|
||||
__prefix.matched = __prefix.first != __prefix.second;
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user