================
@@ -288,92 +476,82 @@ template <class _Tp, class _Allocator>
 template <class _ForwardIterator>
 _LIBCPP_CONSTEXPR_SINCE_CXX20 void
 __split_buffer<_Tp, _Allocator>::__construct_at_end_with_size(_ForwardIterator 
__first, size_type __n) {
-  _ConstructTransaction __tx(std::addressof(this->__end_), __n);
+  _ConstructTransaction __tx(this, __data_.end(), __n);
   for (; __tx.__pos_ != __tx.__end_; ++__tx.__pos_, (void)++__first) {
-    __alloc_traits::construct(__alloc_, std::__to_address(__tx.__pos_), 
*__first);
+    __alloc_traits::construct(__data_.__alloc_, 
std::__to_address(__tx.__pos_), *__first);
   }
 }
 
 template <class _Tp, class _Allocator>
 _LIBCPP_CONSTEXPR_SINCE_CXX20 inline void
 __split_buffer<_Tp, _Allocator>::__destruct_at_begin(pointer __new_begin, 
false_type) {
-  while (__begin_ != __new_begin)
-    __alloc_traits::destroy(__alloc_, std::__to_address(__begin_++));
+  pointer __begin = __data_.__begin_;
+  while (__begin != __new_begin)
+    __alloc_traits::destroy(__data_.__alloc_, std::__to_address(__begin++));
+  __data_.__update_begin(__begin);
 }
 
 template <class _Tp, class _Allocator>
 _LIBCPP_CONSTEXPR_SINCE_CXX20 inline void
 __split_buffer<_Tp, _Allocator>::__destruct_at_begin(pointer __new_begin, 
true_type) {
-  __begin_ = __new_begin;
+  __data_.__update_begin(__new_begin);
 }
 
 template <class _Tp, class _Allocator>
 _LIBCPP_CONSTEXPR_SINCE_CXX20 inline _LIBCPP_HIDE_FROM_ABI void
 __split_buffer<_Tp, _Allocator>::__destruct_at_end(pointer __new_last, 
false_type) _NOEXCEPT {
-  while (__new_last != __end_)
-    __alloc_traits::destroy(__alloc_, std::__to_address(--__end_));
-}
-
-template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 inline _LIBCPP_HIDE_FROM_ABI void
-__split_buffer<_Tp, _Allocator>::__destruct_at_end(pointer __new_last, 
true_type) _NOEXCEPT {
-  __end_ = __new_last;
+  pointer __end = __data_.end();
+  while (__new_last != __end)
----------------
ldionne wrote:

Same comment here.

https://github.com/llvm/llvm-project/pull/139632
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to