swift
96806f4d - [cxx-interop] Windows: unify address-only logic and mark non-trivial loadable C++ types as unavailable

Commit
2 years ago
[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.
Author
hyp hyp
Committer
hyp hyp
Parents
Loading