-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Start recovering from missing types in SIL deserialization #17564
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
Start recovering from missing types in SIL deserialization #17564
Conversation
Now that @inlinable is a supported feature, we need to handle cases where a function is inlinable but it references some type that imports differently in different Swift versions. To start, handle the case where a SIL function's type is now invalid and therefore the entire function can't be imported. This doesn't open up anything interesting yet, but it's a start. Part of rdar://problem/40899824
@swift-ci Please test |
@swift-ci Please test source compatibility |
@swift-ci Please smoke test compiler performance |
@swift-ci Please test |
Build failed |
Build failed |
8714ee4
to
422a2fe
Compare
@swift-ci Please smoke test macOS |
422a2fe
to
71efe36
Compare
This is enough to let the test case in rdar://problem/40899824 pass, and any callers of this function already need to be able to handle a nullptr result. There's a lot more work to do in this area, but it's nice to get the simple things working again.
71efe36
to
f1b347c
Compare
@swift-ci Please test Linux |
@swift-ci Please smoke test macOS |
Build failed |
|
||
import rdar40899824Helper | ||
|
||
public protocol Proto: class { |
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.
Is the ": class" important for the 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.
Oh, probably not. That's just how the original Radar's test case went.
…ly-idea Start recovering from missing types in SIL deserialization rdar://problem/40899824 (cherry picked from commit 747e318)
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.
LGTM
Now that
@inlinable
is a supported feature, we need to handle cases where a function is inlinable but it references some type that imports differently in different Swift versions. To start, handle the case where a SIL function's type is now invalid and therefore the entire function can't be imported.This doesn't open up anything interesting yet, but it's a start.This simple case is enough to fix problems when a SIL function is only referenced from a witness table and not actually used.rdar://problem/40899824