[Lldb-commits] [libcxx] [lldb] [libcxx] adds size-based `__split_buffer` representation to unstable ABI (PR #139632)

Louis Dionne via lldb-commits lldb-commits at lists.llvm.org
Thu Jun 26 12:05:47 PDT 2025


================
@@ -431,52 +599,61 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 void __split_buffer<_Tp, _Allocator>::shrink_to_fi
 template <class _Tp, class _Allocator>
 template <class... _Args>
 _LIBCPP_CONSTEXPR_SINCE_CXX20 void __split_buffer<_Tp, _Allocator>::emplace_front(_Args&&... __args) {
-  if (__begin_ == __first_) {
-    if (__end_ < __cap_) {
-      difference_type __d = __cap_ - __end_;
+  if (__data_.__begin_ == __data_.__first_) {
+    pointer __end = __data_.end();
+    if (__data_.__front_spare() != 0) {
----------------
ldionne wrote:

```suggestion
    if (__data_.__back_spare() > 0) {
```

https://github.com/llvm/llvm-project/pull/139632


More information about the lldb-commits mailing list