Skip to content

[sil] When parsing if we find an error when parsing a SILBasicBlock emit a misc error showing the block that failed. #34699

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

gottesmm
Copy link
Contributor

Otherwise, if for some reason we did not emit a diagnostic, we will just emit an
empty SILModule without any diagnostic which can be really confusing. This
ensures at least something is emitted.

I wanted to do this only if we actually emitted an error, but given that once we
emit a first error, we can't tell if we emitted more errors (we only know that
we emitted errors), we always emit this diagnostic on error. That is better than
just being confused about an empty sil module being output.

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves SR-NNNN.

…mit a misc error showing the block that failed.

Otherwise, if for some reason we did not emit a diagnostic, we will just emit an
empty SILModule without any diagnostic which can be really confusing. This
ensures at least something is emitted.

I wanted to do this only if we actually emitted an error, but given that once we
emit a first error, we can't tell if we emitted more errors (we only know that
we emitted errors), we always emit this diagnostic on error. That is better than
just being confused about an empty sil module being output.
@gottesmm gottesmm requested a review from meg-gupta November 12, 2020 02:33
@gottesmm
Copy link
Contributor Author

@swift-ci smoke test

Copy link
Contributor

@meg-gupta meg-gupta left a comment

Choose a reason for hiding this comment

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

thanks! this will be useful while writing sil tests!

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