Skip to content

Conversation

Michael137
Copy link

Starting with llvm#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.

frederick-vs-ja and others added 3 commits August 26, 2025 21:37
…m#142516)

This PR mirrors changes of `__compressed_pair_padding` in libc++ into
lldb test suite.

Related PR for libc++:
- llvm#108956
- llvm#109028
- llvm#142125

(cherry picked from commit 119705e)
(cherry picked from commit 205591b)
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 7b22660)
(cherry picked from commit e4daa06)
…lvm#155153)

Starting with llvm#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 20dd053)
(cherry picked from commit f3ec20b)
@Michael137 Michael137 requested a review from a team as a code owner August 26, 2025 19:41
@Michael137 Michael137 assigned Michael137 and unassigned Michael137 Aug 26, 2025
@Michael137
Copy link
Author

@swift-ci test

@Michael137
Copy link
Author

@swift-ci test Windows

@adrian-prantl adrian-prantl merged commit d832355 into swift/release/6.2.1 Aug 27, 2025
3 checks passed
@adrian-prantl adrian-prantl deleted the lldb/compressed-pair-fix-to-6.2.1 branch August 27, 2025 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants