Skip to content

[5.9] Emit updated debug info when inout parameters are consumed and reinitialized. #66143

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

Conversation

jckarter
Copy link
Contributor

@jckarter jckarter commented May 25, 2023

––– CCC Information –––
• Issue: rdar://109740281
• Explanation: Makes inout parameters get debug info updates when consumed and reinitialized, like local variables.
• Scope of Issue: inout parameter values would appear to be initialized in the debugger when invalid.
• Origination: Noncopyable types support.
• Risk: Low. Improves debug info for new code using noncopyable types, but should have no effect on existing code that doesn't use noncopyable types.
• Reviewed By: @gottesmm
• Automated Testing: Swift CI
• Dependencies: None
• Builder Impact: Not applicable
• Directions for QE: None

…ialized.

Change SILGen to emit the `debug_value` instruction using the original inout
parameter address, instead of the `mark_must_check` inserted for move-only
parameters, because code in the MoveOnlyAddressChecker did not expect to
find the debug_value anywhere but on the original address. Update move-only
diagnostics so that they pick up the declaration name for a memory location
from any debug_value instruction if there are more than one. rdar://109740281
@jckarter jckarter requested a review from a team as a code owner May 25, 2023 20:06
@jckarter
Copy link
Contributor Author

@swift-ci Please test

1 similar comment
@jckarter
Copy link
Contributor Author

@swift-ci Please test

@jckarter jckarter merged commit 178032e into swiftlang:release/5.9 May 30, 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