[all-commits] [llvm/llvm-project] 8c3f99: [lldb][test][NFC] Re-arrange ifdefs in compressed_...

Michael Buch via All-commits all-commits at lists.llvm.org
Tue Aug 26 02:35:15 PDT 2025


  Branch: refs/heads/release/21.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 8c3f99c95bacef28c49a5977de9eb3610e34088f
      https://github.com/llvm/llvm-project/commit/8c3f99c95bacef28c49a5977de9eb3610e34088f
  Author: Michael Buch <michaelbuch12 at gmail.com>
  Date:   2025-08-26 (Tue, 26 Aug 2025)

  Changed paths:
    M lldb/packages/Python/lldbsuite/test/make/libcxx-simulators-common/compressed_pair.h

  Log Message:
  -----------
  [lldb][test][NFC] Re-arrange ifdefs in compressed_pair.h

In an upcoming patch we'll start supporting a new compressed_pair
layout. This refactor will make it easier to add tests for that new
layout.

(cherry picked from commit 7b22660d2aa0a9906e85d2c25e8a6577c39b31e0)


  Commit: a5448ad73b1e173b7af6d8d8f333568034c5ed13
      https://github.com/llvm/llvm-project/commit/a5448ad73b1e173b7af6d8d8f333568034c5ed13
  Author: Michael Buch <michaelbuch12 at gmail.com>
  Date:   2025-08-26 (Tue, 26 Aug 2025)

  Changed paths:
    M lldb/packages/Python/lldbsuite/test/make/libcxx-simulators-common/compressed_pair.h
    M lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp
    M lldb/source/Plugins/Language/CPlusPlus/LibCxx.h
    M lldb/source/Plugins/Language/CPlusPlus/LibCxxList.cpp
    M lldb/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp
    M lldb/source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp
    M lldb/source/Plugins/Language/CPlusPlus/LibCxxVector.cpp
    M lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/invalid-vector/main.cpp
    M lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/string/TestDataFormatterLibcxxStringSimulator.py
    M lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/string/main.cpp
    M lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/unique_ptr/TestDataFormatterLibcxxUniquePtrSimulator.py
    M lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/unique_ptr/main.cpp

  Log Message:
  -----------
  [lldb][DataFormatters] Support newer _LIBCPP_COMPRESSED_PAIR layout (#155153)

Starting with https://github.com/llvm/llvm-project/pull/154686 the
compressed_pair children are now wrapped in an anonymous structure.

This patch adjusts the LLDB data-formatters to support that.

Outstanding questions:
1. Should GetChildMemberWithName look through anonymous structures? That
will break users most likely. But maybe introducing a new API is worth
it? Then we wouldnt have to do this awkward passing around of
`anon_struct_index`
2. Do we support the layout without the anonymous structure? It's not
too much added complexity. And we did release that version of libc++, so
there is code out there compiled against it. But there is no great way
of testing it (some of our macOS matrix bots do test it i suppose, but
not in a targeted way). We have the layout "simulator" tests for some of
the STL types which I will adjust.

(cherry picked from commit 20dd053160f7d933037aacb69067ef4d77996ba1)


Compare: https://github.com/llvm/llvm-project/compare/f01726bfef38...a5448ad73b1e

To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list