Skip to content

libclang: declare blocks interfaces always #6833

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 2 commits into from
May 11, 2023

Conversation

compnerd
Copy link
Member

The implementation of these methods is not reliant on the availability of the Blocks extension in the compiler. However, when building on Windows, the interface declaration is important for the attribution of the DLL storage. Without the attribution, the method implementation is built but not made available as part of the ABI. Use a check for the blocks extension to determine how method signature is viewed rather than controlling whether it is part of the interface.

(cherry picked from commit ce5ad23)

The implementation of these methods is not reliant on the availability
of the Blocks extension in the compiler.  However, when building on
Windows, the interface declaration is important for the attribution of
the DLL storage.  Without the attribution, the method implementation is
built but not made available as part of the ABI.  Use a check for the
blocks extension to determine how method signature is viewed rather than
controlling whether it is part of the interface.

(cherry picked from commit ce5ad23)
@compnerd
Copy link
Member Author

CC: @hyp

@compnerd
Copy link
Member Author

@swift-ci please test

When building with compilers that do not support the Blocks extension,
we would fail to compile due to the missing type specifier on the
`typedef`.  This should repair those builds.

Fixes: llvm#62640
(cherry picked from commit d747f82)
@compnerd
Copy link
Member Author

@swift-ci please test

@compnerd
Copy link
Member Author

@swift-ci please test Windows platform

@compnerd compnerd merged commit 466a716 into swiftlang:swift/release/5.9 May 11, 2023
@compnerd compnerd deleted the blocking-blocks branch May 11, 2023 01:24
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.

1 participant