Skip to content

Fix field count in emitted reflection data #78961

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

Merged
merged 2 commits into from
Jan 28, 2025

Conversation

tbkka
Copy link
Contributor

@tbkka tbkka commented Jan 27, 2025

PR #78467 omitted certain fields from the FieldDescriptor list, but did not update the count of fields that's emitted just before that list.

Update the count so it matches the number of field descriptors we actually emit.

Resolves rdar://143402921

tbkka added 2 commits January 27, 2025 14:41
PR swiftlang#78467 omitted certain fields from the FieldDescriptor list,
but did not update the count of fields that's emitted
just before that list.

Update the count so it matches the number of field descriptors
we actually emit.

Resolves rdar://143402921
@tbkka tbkka requested review from mikeash and egorzhdan January 27, 2025 23:26
@tbkka tbkka requested a review from rjmccall as a code owner January 27, 2025 23:26
@tbkka
Copy link
Contributor Author

tbkka commented Jan 27, 2025

@swift-ci Please test

Copy link
Contributor

@egorzhdan egorzhdan left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@egorzhdan egorzhdan added the c++ interop Feature: Interoperability with C++ label Jan 28, 2025
@tbkka tbkka merged commit 8853d39 into swiftlang:main Jan 28, 2025
5 checks passed
susmonteiro added a commit that referenced this pull request May 23, 2025
In #78467 and #78961, we stopped emitting metadata for private C++ fields. However, this created a mismatch between the fields emitted and the number of fields + their offsets in the StructDescriptor.

rdar://147263490
(cherry picked from commit 72b13b3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ interop Feature: Interoperability with C++
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants