Skip to content

[lldb] Update Swift String summary formatter for new bridged case #9720

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

kastiglione
Copy link

@kastiglione kastiglione commented Dec 11, 2024

Supports a new discriminator case: "immortal, bridged". Added in swiftlang/swift#74881.

There are now three bridged cases: immortal, shared, foreign. The top 4 bits of the discriminator of these cases are:

Case Bits
immortal 1100
shared 0100
foreign 0101

This change updates the mask used to recognize immortal bridged strings. Previously the mask was 0b1110, which checked the top bit (for zero). Now the mask is 0b0110, which ignores the top bit. When the middle two bits are 10, then it's treated as a bridged string.

rdar://141019389

Supports a new discriminator case: immortal, bridged. Added in swiftlang/swift#74881.
@kastiglione kastiglione requested a review from a team as a code owner December 11, 2024 19:11
@kastiglione kastiglione marked this pull request as draft December 11, 2024 19:11
@kastiglione
Copy link
Author

Working on a test, putting this up for initial feedback in the meantime.

Copy link

@Catfish-Man Catfish-Man left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this! It looks correct to me: the second bit of the discriminator indicates "is bridged", but overloaded to mean something else if the third bit is 1.

@kastiglione kastiglione marked this pull request as ready for review December 11, 2024 21:24
@kastiglione
Copy link
Author

@swift-ci test

@adrian-prantl
Copy link

@swift-ci test windows

@adrian-prantl adrian-prantl merged commit 4f89c41 into swift/release/6.1 Dec 12, 2024
3 checks passed
@adrian-prantl adrian-prantl deleted the dl/lldb-Update-Swift-String-summary-formatter-for-new-bridged-case branch December 12, 2024 18:01
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