https://github.com/cjdb closed https://github.com/llvm/llvm-project/pull/106433
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -13,7 +13,7 @@
// Range algorithms should return `std::ranges::dangling` when given a
dangling range.
cjdb wrote:
Please revert and apply in a separate patch.
https://github.com/llvm/llvm-project/pull/68494
___
@@ -0,0 +1,171 @@
+//===--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
https://github.com/cjdb requested changes to this pull request.
Thanks for working on this, it's an important algorithm to have. I've left some
comments, but would like to see this merged by the end of January.
https://github.com/llvm/llvm-project/pull/68494
@@ -1083,6 +1083,27 @@ rvalue_iterator(T*) -> rvalue_iterator;
static_assert(std::random_access_iterator>);
+// The ProxyDiffTBase allows us to conditionally specify
Proxy::difference_type
+// which we need in certain situations. For example when we want
+// std::weakly_incr
@@ -0,0 +1,71 @@
+// -*- C++ -*-
+//===--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-
@@ -1149,9 +1171,11 @@ struct Proxy {
// Calling swap(Proxy{}, Proxy{}) would fail (pass prvalues)
// Compare operators are defined for the convenience of the tests
- friend constexpr bool operator==(const Proxy&, const Proxy&)
-requires (std::equality_comparable && !
@@ -0,0 +1,71 @@
+// -*- C++ -*-
+//===--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-
@@ -0,0 +1,171 @@
+//===--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
@@ -1172,6 +1198,22 @@ struct Proxy {
requires std::three_way_comparable_with, std::decay_t> {
return lhs.data <=> rhs.data;
}
+
+ // Needed to allow certain types to be weakly_incremental
+ constexpr Proxy& operator++()
+requires(HasPreIncrementOp)
+ {
+++
https://github.com/cjdb edited https://github.com/llvm/llvm-project/pull/68494
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -1161,9 +1185,11 @@ struct Proxy {
return lhs.data == rhs.data;
}
- friend constexpr auto operator<=>(const Proxy&, const Proxy&)
-requires (std::three_way_comparable && !std::is_reference_v)
- = default;
+ friend constexpr auto operator<=>(const Proxy& lhs, co
@@ -0,0 +1,71 @@
+// -*- C++ -*-
+//===--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-
@@ -0,0 +1,54 @@
+// -*- C++ -*-
+//===--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-
@@ -1149,9 +1171,11 @@ struct Proxy {
// Calling swap(Proxy{}, Proxy{}) would fail (pass prvalues)
// Compare operators are defined for the convenience of the tests
- friend constexpr bool operator==(const Proxy&, const Proxy&)
-requires (std::equality_comparable && !
Author: Christopher Di Bella
Date: 2021-08-11T02:48:53Z
New Revision: c874dd53628db8170d4c5ba3878817abc385a695
URL:
https://github.com/llvm/llvm-project/commit/c874dd53628db8170d4c5ba3878817abc385a695
DIFF:
https://github.com/llvm/llvm-project/commit/c874dd53628db8170d4c5ba3878817abc385a695.dif
https://github.com/cjdb updated https://github.com/llvm/llvm-project/pull/139632
>From 88bc35049f774c8c3a5c35ff22470a0670ee3e9d Mon Sep 17 00:00:00 2001
From: Christopher Di Bella
Date: Wed, 7 May 2025 20:41:56 +
Subject: [PATCH 1/5] [libcxx] adds size-based `__split_buffer` representation
cjdb wrote:
Ping. I would appreciate it if this PR could be merged in time for my
presentation at Asia LLVM, which is at the start of next week.
https://github.com/llvm/llvm-project/pull/139632
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
cjdb wrote:
You're right that it's not _strictly_ necessary, but it makes the code
**substantially** simpler when they're coupled. Otherwise, we need to convert
from using a size-based vector to a pointer-based `__split_buffer`, which I
found to be confusing
cjdb wrote:
@vogelsgesang, this patch is only changing `__split_buffer`. The intention was
for this patch to be quickly merged, and for the feedback from this patch to
influence the changes to `vector` (thereby minimising churn and repeated
comments). Changes
@@ -184,67 +172,299 @@ public:
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void
swap(__split_buffer& __x)
_NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value ||
__is_nothrow_swappable_v<__alloc_rr>);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FR
cjdb wrote:
Done.
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
cjdb wrote:
I think the third option is the best, which will let us control vector and
deque independently.
https://github.com/llvm/llvm-project/pull/139632
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
h
@@ -78,23 +80,232 @@ public:
__split_buffer,
void>;
- pointer __first_;
- pointer __begin_;
- pointer __end_;
- _LIBCPP_COMPRESSED_PAIR(pointer, __cap_, allocator_type, __alloc_);
+ struct __data {
cjdb wrote:
@@ -431,52 +599,61 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 void __split_buffer<_Tp,
_Allocator>::shrink_to_fi
template
template
_LIBCPP_CONSTEXPR_SINCE_CXX20 void __split_buffer<_Tp,
_Allocator>::emplace_front(_Args&&... __args) {
- if (__begin_ == __first_) {
-if (__end_ < _
cjdb wrote:
I still think that `_LIBCPP_SIZE_BASED_VECTOR` is the most appropriate name,
since this work was entirely motivated by size-based vector, and this PR is a
precursor to enabling size-based vector in libc++. The changes to `std::deque`
are only happ
@@ -253,30 +436,35 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 void __split_buffer<_Tp,
_Allocator>::__construct_
template
_LIBCPP_CONSTEXPR_SINCE_CXX20 void
__split_buffer<_Tp, _Allocator>::__construct_at_end(size_type __n,
const_reference __x) {
- _ConstructTransaction __tx(std::add
cjdb wrote:
@ldionne Would you mind reviewing this again, please?
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
@@ -74,6 +77,40 @@ def stdstring_SummaryProvider(valobj, dict):
return '"' + strval + '"'
+def get_buffer_data(parent):
+map_valobj = parent.valobj.GetChildMemberWithName("__map_")
+map_data = map_valobj.GetChildMemberWithName("__data_")
+if map_data.I
cjdb wrote:
@ldionne if you don't have any further commentary, I'd like to merge this PR so
that I can move on to upstreaming size-based vector.
https://github.com/llvm/llvm-project/pull/139632
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
30 matches
Mail list logo