mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[interop][SwiftToCxx] add a Swift stdlib overlay header
It currently provides begin and end functions for array iteration
This commit is contained in:
@@ -759,6 +759,11 @@ EmittedClangHeaderDependencyInfo swift::printModuleContentsAsCxx(
|
||||
OutputLanguageMode::Cxx);
|
||||
writer.write();
|
||||
info.dependsOnStandardLibrary = writer.isStdlibRequired();
|
||||
if (M.isStdlibModule()) {
|
||||
// Embed an overlay for the standard library.
|
||||
ClangSyntaxPrinter(moduleOS).printIncludeForShimHeader(
|
||||
"_SwiftStdlibCxxOverlay.h");
|
||||
}
|
||||
|
||||
os << "#ifndef SWIFT_PRINTED_CORE\n";
|
||||
os << "#define SWIFT_PRINTED_CORE\n";
|
||||
|
||||
Reference in New Issue
Block a user