Commit Graph

9 Commits

Author SHA1 Message Date
Alex Lorenz
2e3aa87737 Revert "Revert "Merge pull request #41831 from hyp/unify-header""
This reverts commit 4c9582c295.
2022-03-19 13:36:28 -07:00
Alex Lorenz
4c9582c295 Revert "Merge pull request #41831 from hyp/unify-header"
This reverts commit cd93d23bac, reversing
changes made to f9f5476e9a.
2022-03-18 10:03:07 -07:00
Alex Lorenz
9d52099d5b [cxx-interop] start to emitting a unified header file for a Swift module
This change removes the -emit-cxx-header option, and adds a new -emit-clang-header-path option instead. It's aliased to -emit-objc-header-path for now, but in the future, -emit-objc-header-path will alias to it. After this change Swift can start emitting a single header file that can be expose declarations to C, Objective-C, or C++. For now C++ interface is generated (for all public decls) only when -enable-cxx-interop flag is passed, but that behavior will change once  attribute is supported.
2022-03-17 10:34:47 -07:00
Alex Lorenz
858a847d27 [cxx-interop] use SWIFT_NOEXCEPT for Swift function prototypes
This will allow these functions to be used from C.

Also add a static_assert to verify that noexcept is actually used.
2022-03-13 11:08:32 -07:00
Alex Lorenz
ebcf2f707a [interop] fixup the interop build test substitutions 2022-03-10 10:19:06 -08:00
Alex Lorenz
07a1f569c6 [interop] add target-interop-clangxx test expansion to build C++ file with /MD msvc mode 2022-03-10 09:27:05 -08:00
Alex Lorenz
846fdb5307 [interop] add target-build-swift-link-cxx option for windows to link correctly 2022-03-10 08:05:52 -08:00
Alex Lorenz
1d3b68208e [interop][SwiftToC++] fix execution tests to hopefully link correctly on windows 2022-03-09 20:44:16 -08:00
Alex Lorenz
fcdcb2a9f1 [interop][SwiftToC++] print C++ interface for top-level Swift functions 2022-03-09 14:53:12 -08:00