-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[silgen] Mark a bunch of functions that SILGen open-codeds as "auto-generated" and thus not user generated code. #33166
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
[silgen] Mark a bunch of functions that SILGen open-codeds as "auto-generated" and thus not user generated code. #33166
Conversation
@swift-ci test |
@swift-ci test source compatibility |
Doing a bigger test to make sure nothing changes (in a paranoid sort of way) |
@@ -1284,22 +1302,22 @@ void SILGenModule::emitDestructor(ClassDecl *cd, DestructorDecl *dd) { | |||
if (dd->hasBody()) { | |||
SILDeclRef destroyer(dd, SILDeclRef::Kind::Destroyer); | |||
SILFunction *f = getFunction(destroyer, ForDefinition); | |||
preEmitFunction(destroyer, dd, f, dd); | |||
RegularLocation loc(dd); |
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 change seems like NFC here (which would be correct). Just making sure, is that intentional?
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 did it to match the code all around to it.
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.
Looks good overall.
32532c7
to
f3476ba
Compare
…enerated" and thus not user generated code. This ensures that we do not emit diagnostics onto these functions. I noticed we were doing this with my work on opt-remarks when I was hitting diagnostics in these functions in a set of subsequent commits. The way that I found these is that I went through this file and looked for any cases where we were never calling emitStmt on a user provided function body. I also eliminated two places where we were setting a new DebugScope even though preEmitFunction already does that for us.
f3476ba
to
e3fa137
Compare
@swift-ci test |
@swift-ci test source compatibility |
Build failed |
@swift-ci test windows platform |
Release did not fail b/c of this commit. Build error. |
This ensures that we do not emit diagnostics onto these functions. I noticed we
were doing this with my work on opt-remarks when I was hitting diagnostics in
these functions in a set of subsequent commits.
The way that I found these is that I went through this file and looked for any
cases where we were never calling emitStmt on a user provided function body.
I also eliminated two places where we were setting a new DebugScope even though
preEmitFunction already does that for us.