Skip to content

[cxx-interop] Treat std::string as an owned type after libc++ change #71071

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
wants to merge 1 commit into from

Conversation

egorzhdan
Copy link
Contributor

After the libc++ modulemap was split into multiple top-level modules, the owning module of class basic_string changed: it is now std_string instead of std. That means std.apinotes is no longer picked up by clang, and SwiftImportAs: owned has no effect.

This makes sure we continue treating std::string as an owned type, and import default expressions of std::string parameters properly.

rdar://121391798

After the libc++ modulemap was split into multiple top-level modules, the owning module of `class basic_string` changed: it is now `std_string` instead of `std`. That means `std.apinotes` is no longer picked up by clang, and `SwiftImportAs: owned` has no effect.

This makes sure we continue treating `std::string` as an owned type, and import default expressions of `std::string` parameters properly.

rdar://121391798
@egorzhdan egorzhdan added the c++ interop Feature: Interoperability with C++ label Jan 22, 2024
@egorzhdan
Copy link
Contributor Author

@swift-ci please smoke test

@egorzhdan
Copy link
Contributor Author

@swift-ci please test source compatibility

@egorzhdan
Copy link
Contributor Author

Abandoning this in favor of #71181 and swiftlang/llvm-project#8063

@egorzhdan egorzhdan closed this Jan 29, 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