Files
swift-mirror/test/Interop/Cxx/library-evolution/Inputs/module.modulemap
Egor Zhdan 8859b629fa [cxx-interop] Allow using C-like structs in public Swift interfaces
When compiling with C++ interop enabled, we enable extra safety checks to prevent library authors from accidentally exposing ABI-fragile C++ symbols in resilient Swift interfaces.

The heuristic we use is overly strict, and it prevents the compiler from being able to typecheck various modules from their interfaces when C++ interop is enabled. Darwin and System are two of such modules.

The underlying challenge is that there isn't a good distinction between C structs and C++ structs: whenever parsing a header file in C++ language mode, Clang assumes that every struct is a C++ struct.

This relaxes the heuristic to allow exposing C-like structs in resilient interfaces.

rdar://140203932
2024-12-06 20:18:53 +00:00

4 lines
57 B
Plaintext

module MyCLibrary {
header "my_c_header.h"
export *
}