[ModuleInterface] Print some implementation-only imports in the private interface

Print implementation-only imports in the private textual interface
only if also importing SPI. This allows to export types from
implementation-only imports in SPI and brings the private textual
interfaces in line with the binary interfaces.

This is a temporary solution as we need to better design the language
feature around this.

This feature requires passing -experimental-spi-imports to the frontend
that generates the private swiftinterface file.
This commit is contained in:
Alexis Laferrière
2020-07-20 14:29:32 -07:00
parent 6334c34027
commit 0cce54954a
6 changed files with 117 additions and 6 deletions

View File

@@ -313,6 +313,8 @@ static void ParseModuleInterfaceArgs(ModuleInterfaceOptions &Opts,
Args.hasArg(OPT_module_interface_preserve_types_as_written);
Opts.PrintFullConvention |=
Args.hasArg(OPT_experimental_print_full_convention);
Opts.ExperimentalSPIImports |=
Args.hasArg(OPT_experimental_spi_imports);
}
/// Save a copy of any flags marked as ModuleInterfaceOption, if running