[all-commits] [llvm/llvm-project] de10c1: [lldb] Ignore libcxx std::ranges global variables ...

Michael Buch via All-commits all-commits at lists.llvm.org
Fri Mar 3 09:37:15 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: de10c1a824405833a0f49b22e7fa3f32a1393cc3
      https://github.com/llvm/llvm-project/commit/de10c1a824405833a0f49b22e7fa3f32a1393cc3
  Author: Michael Buch <michaelbuch12 at gmail.com>
  Date:   2023-03-03 (Fri, 03 Mar 2023)

  Changed paths:
    M lldb/include/lldb/Target/LanguageRuntime.h
    M lldb/source/Core/ValueObject.cpp
    M lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp
    M lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.h
    A lldb/test/API/lang/cpp/hide_global_ranges_vars/Makefile
    A lldb/test/API/lang/cpp/hide_global_ranges_vars/TestHideGlobalRangesVars.py
    A lldb/test/API/lang/cpp/hide_global_ranges_vars/main.cpp

  Log Message:
  -----------
  [lldb] Ignore libcxx std::ranges global variables in frame var

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 up.

Differential Revision: https://reviews.llvm.org/D145245




More information about the All-commits mailing list