Commit Graph

5 Commits

Author SHA1 Message Date
Egor Zhdan
78eee32467 [cxx-interop] Import NonCopyable* as OpaquePointer if noncopyable generics are disabled
C++ pointer type `T*` is generally imported as `Unsafe(Mutable)Pointer<T>`. However, if `T` is non-copyable in Swift (e.g. it has a deleted C++ copy constructor), using `UnsafePointer<T>` type requires noncopyable generics to be enabled.

This was causing assertion failures when building SwiftCompilerSources in https://github.com/apple/swift/pull/72912.
2024-04-23 18:47:55 +01:00
Alex Lorenz
bacc58e0f7 [cxx-interop] provide correct referential access to non-copyable base fields from a derived value type 2023-11-28 20:10:07 -08:00
Alex Lorenz
51d0e84933 [cxx-interop] add a test to cover accessing non-copyable field 2023-11-28 14:07:44 -08:00
Alex Lorenz
fd6a5a20ef [cxx-interop] test accessing fields of a move-only C++ type 2023-11-28 12:26:48 -08:00
Alex Lorenz
3cdb4b1151 [cxx-interop] add some initial move only tests 2023-11-16 10:08:29 -08:00