swift
85c358dc - [cxx-interop] Support importing value types exported from Swift

Commit
343 days ago
[cxx-interop] Support importing value types exported from Swift Whenever a Swift type is exported to C++, we create a corresponding type on the C++ side. However, we did not support importing value types back into Swift. This PR addresses this problem. Unfortunately, we cannot just set the C++ type as the ClangNode of Swift's type. Types with ClangNodes are using the foreign representation, but in this case we want to use the native type whenever possible (e.g., for codegen). To work this around, this PR updates ClangTypeConverter to make sure we have the correct Clang types when we emit function calls to C++ APIs. It also updates the importer to not attempt to import types that are annotated with ExternalSourceSymbolAttr attributes as Swift types.
Author
Gabor Horvath
Committer
Gabor Horvath
Parents
Loading