[libcxx-commits] [PATCH] D142993: [libcxx] Add _LIBCPP_NODEBUG to global std::ranges::__cpo variables

Michael Buch via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jan 31 10:11:05 PST 2023


Michael137 created this revision.
Michael137 added a reviewer: aprantl.
Herald added a project: All.
Michael137 requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

The motivation is to avoid cluttering LLDB's global variable view for
`std::ranges` users.

Before:

  (lldb) frame var -g
  ...
  (const std::ranges::__end::__fn) std::__1::ranges::__cpo::end = {}
  (const std::ranges::views::__all::__fn) std::__1::ranges::views::__cpo::all = {}
  (const std::ranges::__begin::__fn) std::__1::ranges::__cpo::begin = {}
  (const std::ranges::views::__take::__fn) std::__1::ranges::views::__cpo::take = {}
  (const std::ranges::__max_element::__fn) std::__1::ranges::__cpo::max_element = {}
  (const std::ranges::__size::__fn) std::__1::ranges::__cpo::size = {}
  (const std::ranges::__data::__fn) std::__1::ranges::__cpo::data = {}

After this patch none of these `__cpo` variables would show, since no
debug info is available.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D142993

Files:
  libcxx/include/__algorithm/ranges_copy.h
  libcxx/include/__algorithm/ranges_copy_if.h
  libcxx/include/__algorithm/ranges_find_if_not.h
  libcxx/include/__algorithm/ranges_for_each.h
  libcxx/include/__algorithm/ranges_generate_n.h
  libcxx/include/__algorithm/ranges_make_heap.h
  libcxx/include/__algorithm/ranges_max_element.h
  libcxx/include/__algorithm/ranges_minmax.h
  libcxx/include/__algorithm/ranges_minmax_element.h
  libcxx/include/__algorithm/ranges_mismatch.h
  libcxx/include/__algorithm/ranges_move.h
  libcxx/include/__algorithm/ranges_reverse.h
  libcxx/include/__algorithm/ranges_rotate_copy.h
  libcxx/include/__algorithm/ranges_sort.h
  libcxx/include/__compare/compare_partial_order_fallback.h
  libcxx/include/__compare/compare_strong_order_fallback.h
  libcxx/include/__compare/compare_weak_order_fallback.h
  libcxx/include/__compare/partial_order.h
  libcxx/include/__compare/strong_order.h
  libcxx/include/__compare/weak_order.h
  libcxx/include/__concepts/swappable.h
  libcxx/include/__iterator/advance.h
  libcxx/include/__iterator/distance.h
  libcxx/include/__iterator/iter_move.h
  libcxx/include/__iterator/iter_swap.h
  libcxx/include/__iterator/next.h
  libcxx/include/__iterator/prev.h
  libcxx/include/__memory/ranges_construct_at.h
  libcxx/include/__memory/ranges_uninitialized_algorithms.h
  libcxx/include/__ranges/access.h
  libcxx/include/__ranges/all.h
  libcxx/include/__ranges/as_rvalue_view.h
  libcxx/include/__ranges/common_view.h
  libcxx/include/__ranges/counted.h
  libcxx/include/__ranges/data.h
  libcxx/include/__ranges/drop_view.h
  libcxx/include/__ranges/drop_while_view.h
  libcxx/include/__ranges/elements_view.h
  libcxx/include/__ranges/empty.h
  libcxx/include/__ranges/filter_view.h
  libcxx/include/__ranges/iota_view.h
  libcxx/include/__ranges/istream_view.h
  libcxx/include/__ranges/join_view.h
  libcxx/include/__ranges/lazy_split_view.h
  libcxx/include/__ranges/rbegin.h
  libcxx/include/__ranges/rend.h
  libcxx/include/__ranges/reverse_view.h
  libcxx/include/__ranges/single_view.h
  libcxx/include/__ranges/size.h
  libcxx/include/__ranges/split_view.h
  libcxx/include/__ranges/take_view.h
  libcxx/include/__ranges/take_while_view.h
  libcxx/include/__ranges/transform_view.h
  libcxx/include/__ranges/zip_view.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142993.493659.patch
Type: text/x-patch
Size: 30458 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230131/35f525bc/attachment-0001.bin>


More information about the libcxx-commits mailing list