Skip to content

[IRGen] Bail on opt when seeing non-ABI field. #42106

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 1 commit into from
Mar 31, 2022

Conversation

nate-chandler
Copy link
Contributor

@nate-chandler nate-chandler commented Mar 31, 2022

When analyzing a struct's layout to determine whether it contains a single non-empty field, bail upon encountering a field that is not ABI accessible.

Previously, rather than bailing (though that was the intent), the field was ignored. The result was that structs with a single non-empty field and any number of ABI inaccessible fields would be treated as if they only had a single non-empty field. Trouble ensued.

rdar://79513293

When analyzing a struct's layout to determine whether it contains a
single non-empty field, bail upon encountering a field that is not ABI
accessible.

Previously, rather than bailing (though that was the intent), the field
was ignored.  The result was that struct's with a single non-empty field
and any number of ABI inaccessible fields would be treated as if they
only had a single non-empty field.  Trouble ensued.

rdar://79513293
@nate-chandler
Copy link
Contributor Author

@swift-ci please test

Copy link
Contributor

@aschwaighofer aschwaighofer left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you!

@nate-chandler nate-chandler merged commit 230c435 into swiftlang:main Mar 31, 2022
@nate-chandler nate-chandler deleted the rdar79513293 branch March 31, 2022 14:32
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.

2 participants