Commit Graph

3 Commits

Author SHA1 Message Date
Alex Lorenz
96806f4d44 [cxx-interop] Windows: unify address-only logic and mark non-trivial loadable C++ types as unavailable
Windows logic for determining address-only type layout for a C++ type is now unified with other platforms.
However, this means that on Windows, a C++ type with a custom destructor, but a default copy constructor
is now loadable, even though it's non-trivial. Since Swift does not support such type operations at the
moment (it can't be yet destroyed), mark such type as unavailable in Swift instead, when building for
the Windows target.

This fixes the Windows miscompilation related to such types when they were passed indirectly to C++
functions even though they're actually passed directly.
2023-07-20 14:58:02 -07:00
Alex Lorenz
b5766fd215 [interop] do not assume we need to IRGen destructors of fields inside a record with an explicit destructor 2023-03-26 12:24:57 -07:00
Alex Lorenz
7320cd877c [interop] ensure IRGen reaches code referenced through destructor invoked using the 'delete' statement in C++ 2023-03-20 17:25:29 -07:00