Just a quick brain dump of "first steps" to move Swift/C++ interoperability forward. While there are many big and interesting design questions for a good interoperability story, there are also a large number of implementation tasks that can proceed independently of those design discussions (and often in parallel). This list focuses on those implementation tasks:
- (DONE) Add a flag
-enable-cxx-interop
to the frontend, and have it enable (Objective-)C++ mode in the Clang importer. - Add a lit configuration flag to enable
-enable-cxx-interop
for the full Swift testsuite and fix all of the issues that prevent (Objective-)C code from being imported correctly when it's compiled as C++. The testsuite will likely need a lot ofextern "C"
annotations throughout it's headers---those fixes can be committed to the testsuite behind appropriate #ifdefs. - Import C++ namespaces as Swift enums that have no cases (so-called "uninhabited enums") so the C++ lexical struct