Skip to content

Conversation

@jckarter
Copy link
Contributor

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 gottesmm May 18, 2023 03:44
@jckarter
Copy link
Contributor Author

@swift-ci Please test

Copy link
Contributor

@gottesmm gottesmm left a comment

Choose a reason for hiding this comment

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

Looks great!

@jckarter
Copy link
Contributor Author

@swift-ci Please test Linux

Copy link
Contributor

Choose a reason for hiding this comment

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

Btw, for future reference. I introduced a new API on SILUndef that takes a SILValue and grabs the type/SILModule from it. https://github.com/apple/swift/blob/a1219cc6625991ac13b0187a801ac1eb358e92ee/include/swift/SIL/SILUndef.h#L36

…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 force-pushed the debug-info-for-move-only-reinitialization branch from f83babf to 51f75c9 Compare May 18, 2023 22:35
@jckarter
Copy link
Contributor Author

@swift-ci Please test

@jckarter jckarter merged commit 31032b9 into swiftlang:main 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