Skip to content

[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

Merged
merged 2 commits into from
Jan 23, 2018

Conversation

dcci
Copy link
Member

@dcci dcci commented Jan 22, 2018

Another day, another debug info bug fixed.

rdar://problem/36679700

@dcci
Copy link
Member Author

dcci commented Jan 22, 2018

@swift-ci test and merge

@@ -2436,6 +2436,7 @@ handleConditionalDestroys(SILValue ControlVariableAddr) {
auto &Availability = CDElt.Availability;

B.setInsertionPoint(Release);
B.setCurrentDebugScope(Release->getDebugScope());
Copy link
Contributor

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() ?

Copy link
Contributor

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 ^^

Copy link
Contributor

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?

Copy link
Member Author

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.

Copy link
Contributor

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.

@dcci
Copy link
Member Author

dcci commented Jan 22, 2018

@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.

@dcci
Copy link
Member Author

dcci commented Jan 22, 2018

ugh, this is failing on Linux because there's no Foundation, let me adjust and run again.

@dcci
Copy link
Member Author

dcci commented Jan 22, 2018

@swift-ci test and merge

@dcci
Copy link
Member Author

dcci commented Jan 23, 2018

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 3d9eb3d

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 3d9eb3d

Copy link
Contributor

@vedantk vedantk left a comment

Choose a reason for hiding this comment

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

Thanks!

@dcci
Copy link
Member Author

dcci commented Jan 23, 2018

@swift-ci please test and merge

1 similar comment
@dcci
Copy link
Member Author

dcci commented Jan 23, 2018

@swift-ci please test and merge

@dcci
Copy link
Member Author

dcci commented Jan 23, 2018

@swift-ci please test and merge

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