-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[LifetimeChecker] Update the debug scope when changing insertion point. #14069
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
<rdar://problem/36679700>
@swift-ci test and merge |
@@ -2436,6 +2436,7 @@ handleConditionalDestroys(SILValue ControlVariableAddr) { | |||
auto &Availability = CDElt.Availability; | |||
|
|||
B.setInsertionPoint(Release); | |||
B.setCurrentDebugScope(Release->getDebugScope()); |
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.
This makes me wonder if we should make it illegal to set the insertion point without also doing something to the scope. Should we replace setInsertionPoint with setInsertionPointAndDebugScope() ?
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.
@vedantk For the "let's improve SILBuilder ergonomics" task ^^
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.
@dcci: or should these all be fresh SILBuilderWithScopes?
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.
Probably we should do something like that, let me think and let's chat further.
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.
I proposed setInsertionPointAndDebugScope() for llvm's IRBuilder. The main sticking point was on how to update all existing uses of setInsertionPoint(). It's worth having a separate discussion about this for SILGen.
@vedantk Considering the amount of time I'm spending fixing all these violations, I'll buy you a drink if you fix the SILBuilder API ergonomics. |
ugh, this is failing on Linux because there's no Foundation, let me adjust and run again. |
@swift-ci test and merge |
@swift-ci please test |
Build failed |
Build failed |
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!
@swift-ci please test and merge |
1 similar comment
@swift-ci please test and merge |
Also fixup check lines.
@swift-ci please test and merge |
Another day, another debug info bug fixed.
rdar://problem/36679700