Skip to content

ReplaceOpaqueTypesWithUnderlyingTypes: Use resilience expansion instead of inlinable attribute #24478

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

Conversation

aschwaighofer
Copy link
Contributor

No description provided.

@aschwaighofer
Copy link
Contributor Author

@swift-ci Please smoke test

@aschwaighofer
Copy link
Contributor Author

@swift-ci Please smoke test linux

@@ -2484,9 +2484,18 @@ bool ReplaceOpaqueTypesWithUnderlyingTypes::shouldPerformSubstitution(

// Allow replacement of opaque result types of inlineable function regardless
// of resilience and in which context.
if (namingDecl->getAttrs().hasAttribute<InlinableAttr>()) {
return true;
if (auto *afd = dyn_cast<AbstractFunctionDecl>(namingDecl)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add some tests where either the property itself or just the getter is inlinable?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah ok. A case you might want to test that the old logic definitely would have missed is an @_alwaysEmitIntoClient decl. These are the same as inlinable except they have different linkage -- but don't have an InlinableAttr.

@aschwaighofer
Copy link
Contributor Author

@swit-ci Please test

@aschwaighofer
Copy link
Contributor Author

@swift-ci Please test

@swift-ci
Copy link
Contributor

swift-ci commented May 3, 2019

Build failed
Swift Test Linux Platform
Git Sha - d3a0083

@swift-ci
Copy link
Contributor

swift-ci commented May 3, 2019

Build failed
Swift Test OS X Platform
Git Sha - d3a0083

@aschwaighofer aschwaighofer merged commit 8c26046 into swiftlang:master May 3, 2019
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.

3 participants