Skip to content

[SILOptimizer] Remove auxiliary debug scope in SILDebugInfoGenerator #38917

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
merged 1 commit into from
Aug 18, 2021

Conversation

mshockwave
Copy link
Contributor

Previously inside SILDebugInfoGenerator (i.e. -sil-based-debuginfo
flag) we're removing all debug_value and debug_value_addr to avoid
mixing Swift and SIL source location. But we forgot to handle the source
location inside the auxiliary debug variable info in a alloc_stack
instruction. Which triggered a verification error regarding debug scope
mismatch.

This patch teaches SILDebugInfoGenerator to remove any auxiliary debug
variable scope, if there is any. Which might degrade the debug info
quality but we're mostly care about line number in this mode.

rdar://81709398

…Generator

Previously inside SILDebugInfoGenerator (i.e. `-sil-based-debuginfo`
flag) we're removing all `debug_value` and `debug_value_addr` to avoid
mixing Swift and SIL source location. But we forgot to handle the source
location inside the auxiliary debug variable info in a `alloc_stack`
instruction. Which triggered a verification error regarding debug scope
mismatch.

This patch teaches SILDebugInfoGenerator to remove any auxiliary debug
variable scope, if there is any. Which might degrade the debug info
quality but we're mostly care about line number in this mode.

rdar://81709398
@mshockwave
Copy link
Contributor Author

@swift-ci please test

Copy link
Contributor

@adrian-prantl adrian-prantl left a comment

Choose a reason for hiding this comment

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

Sounds good!

@mshockwave mshockwave merged commit 4e08643 into swiftlang:main Aug 18, 2021
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