Skip to content

[5.9] Fix LowerAggregateInstrs to avoid lowering move-only types #66144

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

Closed
wants to merge 1 commit into from

Conversation

atrick
Copy link
Contributor

@atrick atrick commented May 25, 2023

Fixes rdar://109849028 ([move-only] LowerAggregateInstrs eliminates struct deinitialization)

(cherry picked from commit 95f551e)

  • Explanation: LowerAggregateInstrs converts aggregate destroys and releases into memberwise destroys and releases. Doing so deletes struct deinitializers.

  • Scope of Issue: A struct's deinit would silently fail to run when the struct was a member within another type. In the most trivial cases, with no type composition, and earlier MoveOnlyDeinitInsertion pass was hiding the problem.

  • Risk: Zero risk to regular copyable code. And non-copyable was already broken.

  • PR to main: Fix LowerAggregateInstrs to avoid lowering move-only types #66142

  • Reviewed By: Michael Gottesman

  • Resolves: rdar://109849028 ([move-only] LowerAggregateInstrs eliminates struct deinitialization)

@atrick atrick requested a review from a team as a code owner May 25, 2023 20:13
@atrick atrick changed the title Fix LowerAggregateInstrs to avoid lowering move-only types [5.9] Fix LowerAggregateInstrs to avoid lowering move-only types May 25, 2023
@atrick atrick requested a review from gottesmm May 25, 2023 20:14
Fixes rdar://109849028 ([move-only] LowerAggregateInstrs eliminates struct deinitialization)
@atrick atrick force-pushed the 5.9-fix-loweraggregates branch from 49fc4b1 to c823f9e Compare May 25, 2023 20:24
@atrick
Copy link
Contributor Author

atrick commented May 25, 2023

@swift-ci test

@atrick
Copy link
Contributor Author

atrick commented Jun 6, 2023

Now in PR: #66357!

@atrick atrick closed this Jun 6, 2023
@atrick atrick deleted the 5.9-fix-loweraggregates branch June 6, 2023 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants