Skip to content

🍒6.1 [cxx-interop] Workaround name lookup issues with namespace simd #78683

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

Conversation

porglezomp
Copy link
Contributor

  • Explanation: On Apple platforms, a system module simd declares a namespace simd under #if defined(__cplusplus). This namespace defines C++ overlays of the simd types, but these types are already refined for Swift separately, so it's not necessary to import this namespace. This is the same issue previously encountered for the os module, work around it in the same way.
  • Scope: Projects with C++ interop enabled that import SDK modules and (transitively) import simd.
  • Issues: rdar://143007477
  • Original PRs: [cxx-interop] Workaround name lookup issues with namespace simd #78676
  • Risk: Low, this disables importing declarations which we only recently started importing and which never worked properly.
  • Testing:
  • Reviewers: @egorzhdan @Xazax-hun

On Apple platforms, a system module `simd` declares a `namespace simd`
under `#if defined(__cplusplus)`. This namespace defines C++ overlays of
the simd types, but these types are already refined for Swift
separately, so it's not necessary to import this namespace.

This is the same issue previously encountered for the `os` module, work
around it in the same way.

rdar://143007477
(cherry picked from commit c7021ae)
@porglezomp porglezomp requested a review from a team as a code owner January 16, 2025 17:59
@porglezomp
Copy link
Contributor Author

@swift-ci please test

@porglezomp porglezomp changed the title [cxx-interop] Workaround name lookup issues with namespace simd 🍒6.1 [cxx-interop] Workaround name lookup issues with namespace simd Jan 16, 2025
@porglezomp porglezomp added the 🍒 release cherry pick Flag: Release branch cherry picks label Jan 16, 2025
@porglezomp porglezomp added the c++ interop Feature: Interoperability with C++ label Jan 16, 2025
@porglezomp porglezomp merged commit bc0dc75 into swiftlang:release/6.1 Jan 19, 2025
5 checks passed
@porglezomp porglezomp deleted the 6.1-workaround-simd-quatf branch January 19, 2025 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ interop Feature: Interoperability with C++ 🍒 release cherry pick Flag: Release branch cherry picks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants