Skip to content

IRGen: Use @_weakLinked to test backward deployment of resilient protocols #20173

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 1 commit into from
Nov 1, 2018

Conversation

slavapestov
Copy link
Contributor

@slavapestov slavapestov commented Oct 31, 2018

Get the attribute working for more link entity kinds, which addresses
all the FIXME:s in the original test case.

Now the protocol resilience tests can be updated to use @_weakLinked
for all newly-added protocol requirements and default implementations.

This allows the tests to pass in the backward deployment test scenario
as well.

Eventually this will be based on availability instead of a special
attribute.

This completes rdar://problem/29888071.

…ocols

Get the attribute working for more link entity kinds, which addresses
all the FIXME:s in the original test case.

Now the protocol resilience tests can be updated to use @_weakLinked
for all newly-added protocol requirements and default implementations.

This allows the tests to pass in the backward deployment test scenario
as well.

Eventually this will be based on availability instead of a special
attribute.

This completes <rdar://problem/29888071>.
@slavapestov slavapestov changed the title IRGen: Flesh out @_weakLinked a bit more IRGen: Use @_weakLinked to test backward deployment of resilient protocols Oct 31, 2018
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@slavapestov slavapestov merged commit 9499d1d into swiftlang:master Nov 1, 2018
return accessor->getStorage()->isWeakImported(fromModule);

if (auto *dtor = dyn_cast<DestructorDecl>(this))
return cast<ClassDecl>(dtor->getDeclContext())->isWeakImported(fromModule);
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we need this one. It should be covered by availability when we implement that, but otherwise you'd have to apply this rule to every member of every decl.

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.

2 participants