Skip to content

[5.9] MoveOnlyAddressChecker: Reintroduce debug info for variables after reassignment #66023

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

jckarter
Copy link
Contributor

@jckarter jckarter commented May 19, 2023

Issue: rdar://109218404
• Explanation: When a noncopyable binding's value is consumed, we mark the variable as absent in debug info so that the debugger does not attempt to show the expired value. This patch reintroduces the variable in cases where it's reassigned and becomes valid again.
• Scope of Issue: Improves debug info.
• Origination: Quality of implementation of debug info for the new noncopyable types feature.
• Risk: low -- improves debug info for a new feature. Should have no impact on existing code that doesn't adopt the noncopyable types feature.
• Reviewed By: @gottesmm
• Automated Testing: Swift CI

…assignment.

After a value is consumed, we emit a `debug_value undef` to indicate that the
variable value is no longer valid to the debugger. However, once a value is
reassigned, it becomes valid again, so emit a `debug_value %original_address` to
reassociate the variable with the valid memory location. rdar://109218404
@jckarter jckarter requested a review from a team as a code owner May 19, 2023 17:01
@jckarter
Copy link
Contributor Author

@swift-ci Please test

@jckarter jckarter merged commit 8c0c2e7 into swiftlang:release/5.9 May 19, 2023
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