Skip to content

Conversation

eeckstein
Copy link
Contributor

In case of a non-copyable type the final destroy (or take) of a stack location can be missing if the value has only trivial fields. The optimization inserted a destroy_addr in this case although it wasn't there before.

Beside fixing this problem I also refactored the code a bit to make it more readable.

In case of a non-copyable type the final destroy (or take) of a stack location can be missing if the value has only trivial fields.
The optimization inserted a `destroy_addr` in this case although it wasn't there before.

Beside fixing this problem I also refactored the code a bit to make it more readable.
@eeckstein
Copy link
Contributor Author

@swift-ci test

@eeckstein eeckstein enabled auto-merge October 10, 2025 19:55
@eeckstein eeckstein merged commit fe76542 into swiftlang:main Oct 11, 2025
4 of 5 checks passed
@eeckstein eeckstein deleted the fix-temp-rvalue-elimination branch October 11, 2025 05:44
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.

1 participant