Skip to content

🍒[cxx-interop] Use unique mangling for distinct C++ class template specializations #69813

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

Closed

Conversation

egorzhdan
Copy link
Contributor

This makes sure we are printing more than one level of C++ template specializations when emitting a Swift struct name.

For instance, std::__wrap_iter<char*> and std::__wrap_iter<const char*> are currently imported with the same name in Swift. This means the mangled string will be the same for these specializations, despite them being distinct types. This causes mangling errors.

Original PR: #69408

rdar://117485399
(cherry picked from commit a45d03a)

…cializations

This makes sure we are printing more than one level of C++ template specializations when emitting a Swift struct name.

For instance, `std::__wrap_iter<char*>` and `std::__wrap_iter<const char*>` are currently imported with the same name in Swift. This means the mangled string will be the same for these specializations, despite them being distinct types. This causes mangling errors.

rdar://117485399
(cherry picked from commit a45d03a)
@egorzhdan egorzhdan added the c++ interop Feature: Interoperability with C++ label Nov 13, 2023
@egorzhdan
Copy link
Contributor Author

@swift-ci please test

@egorzhdan egorzhdan closed this Jan 11, 2024
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++
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant