Skip to content

[IRGen][DebugInfo] Use attached SILLocation for generating debug location for variable declaration #38233

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
Jul 7, 2021

Conversation

mshockwave
Copy link
Contributor

Currently IRGen requires the AST node of a variable declaration to generate debug location. However, this will fail if the input is SIL due to the lack of AST reconstruction. Plus, it's unnecessary since we can just use the SILLocation attached on debug_value (and its friends) SIL instruction to generate the correct LLVM debug metadata. This patch implement the said solution.

Resolves SR-14868

@mshockwave
Copy link
Contributor Author

@swift-ci test

1 similar comment
@mshockwave
Copy link
Contributor Author

@swift-ci test

Copy link
Contributor

@eeckstein eeckstein left a comment

Choose a reason for hiding this comment

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

LGTM, but please also wait for @adrian-prantl's review

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.

This looks good, thanks!

Currently IRGen requires the AST node of a variable declaration to
generate debug location. However, this will fail if the input is SIL due
to the lack of AST reconstruction. Plus, it's unnecessary since we can
just use the `SILLocation` attached on `debug_value` (and its friends) SIL
instruction to generate the correct LLVM debug metadata.

Resolves SR-14868
@mshockwave mshockwave force-pushed the dev-irgen-dbg-val-improve branch from 95ca904 to 2d35d31 Compare July 6, 2021 16:41
@mshockwave
Copy link
Contributor Author

@swift-ci test

@swift-ci
Copy link
Contributor

swift-ci commented Jul 6, 2021

Build failed
Swift Test Linux Platform
Git Sha - 2d35d31

@mshockwave
Copy link
Contributor Author

@swift-ci test

@mshockwave
Copy link
Contributor Author

Previously Linux fail with "outdated module cache" error, which I think it's irrelevant to this PR, and now Mac OS X failed with some filesystem issue. Guess I need to launch again
@swift-ci test

@mshockwave mshockwave merged commit 2f5660a into swiftlang:main Jul 7, 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.

4 participants