-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[SIL][Frontend] Simplify debug info generation flow for SIL files #38167
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
@swift-ci test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this looks good, and is makes the options less confusion.
a3c616d
to
3aa9a26
Compare
Alright, instead of removing |
@swift-ci test |
3aa9a26
to
73fd231
Compare
I just simplified the flags passed from driver: No extra |
@swift-ci test |
Build failed |
- If any of the `-g<kind>` flag is given -- except `-gnone`, debug info will be printed into every generated SIL files. - The `-gsil` is deprecated in favor of `-sil-based-debuginfo`. The SILDebugInfoGenerator Pass now generates intermediate SIL file with name "<output file>.sil_dbg_<n>.sil". Other functionalities of that Pass remain the same.
73fd231
to
d00a6cc
Compare
Fix test failure in |
-g<kind>
flag is given -- except-gnone
, debug info will be printed into every generated SIL files.-gsil
is deprecated in favor of-sil-based-debuginfo
to avoid confusion with -g, -gnone, -gline-tables-only etc. The SILDebugInfoGenerator Pass now generates intermediate SIL file with name ".sil_dbg_.sil". Other functionalities of that Pass remain the same.For
-sil-based-debuginfo
, I tried to avoid generating intermediate SIL file (i.e. *.sil_dbg_*.sil) if the input is already a SIL file -- the idea was to modify SILParser if the input is SIL. But it turned out to take non-trivial amount of changes in SILParser, which is probably not worth it for a feature that is less-frequently used. So I eventually fallback to using the existing round-trip-solution by SILDebugInfoGenerator, which always generates an intermediates SIL file, regardless of the input file type.This PR should be synchronized with swiftlang/swift-driver#737