-
Notifications
You must be signed in to change notification settings - Fork 10.5k
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
ReplaceOpaqueTypesWithUnderlyingTypes: Use resilience expansion instead of inlinable attribute #24478
Conversation
…ad of inlinable attribute
@swift-ci Please smoke test |
@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)) { |
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.
Can you add some tests where either the property itself or just the getter is inlinable?
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.
There is one. It failed when I had not added the code for abstract storage decl.
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.
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.
@swit-ci Please test |
@swift-ci Please test |
Build failed |
Build failed |
No description provided.