Skip to content

IRGen: Fix multipayload enums with indirect cases #16916

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

swift_unknownRetain does not work on indirect enum heap buffers.

The existing logic would say: oh one case is
ReferenceCounting::BridgeObject (which on its own probably would not
work with swift_unknownRetain), oh and another second case is NativeObject (for
the indirect buffer), let's use unknowRetain.

Pair the logic down to only use a single style of reference count
operation if all cases are of the same ReferenceCounting type.

rdar://40525268

swift_unknownRetain does not work on indirect enum heap buffers.

The existing logic would say: oh one case is
ReferenceCounting::BridgeObject (which on its own probably would not
work with swift_unknownRetain), oh and another second case is NativeObject (for
the indirect buffer), let's use unknowRetain.

Pair the logic down to only use a single style of reference count
operation if all cases are of the same ReferenceCounting type.

rdar://40525268
@aschwaighofer
Copy link
Contributor Author

@swift-ci Please test and merge

@aschwaighofer
Copy link
Contributor Author

@swift-ci Please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 95e31ee

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 95e31ee

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