-
Notifications
You must be signed in to change notification settings - Fork 10.5k
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
[ClangImporter] Add versioned stubs for import-as-member renames. #8272
[ClangImporter] Add versioned stubs for import-as-member renames. #8272
Conversation
If a top-level declaration is imported as a member in Swift 4 but not in Swift 3, it would still show up in the lookup table for the containing type in Swift 3 mode. We would import it, and then try to add the top-level declaration to the containing type. I'm about to redo this anyway so that the versioned stub will show up (the one for the Swift 4 name) but this is the narrow fix that avoids the assertion failure we were seeing. rdar://problem/31161489
A more general solution to ae458a8: import all versions of a name that are going to show up as members, ignore those that aren't. Further work on <rdar://problem/29170671> Import APIs under their Swift 3 names.
(I'm going to wait for Michael's review on this one, but merge the other one as soon as possible to fix the crash.) @swift-ci Please test |
Build failed |
The Linux failure was in LLDB? I suspect it's nothing, but let's go again. @swift-ci Please test Linux |
@swift-ci Please smoke test macOS |
Build failed |
Linux build got interrupted, but it looks like it made it through all the tests. @swift-ci Please smoke test Linux |
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.
Cool. LGTM!
Builds on #8269 with a more general solution: import all versions of a name that are going to show up as members, ignore those that aren't.
Further work on <rdar://problem/29170671> Import APIs under their Swift 3 names.