Merge pull request #36996 from xymus/lib-access-level-spi-in-api

[Sema] Allow SPI use in API for a module that is completely SPI
This commit is contained in:
Alexis Laferrière
2021-04-22 16:54:49 -07:00
committed by GitHub
7 changed files with 49 additions and 6 deletions

View File

@@ -331,6 +331,13 @@ static void ParseModuleInterfaceArgs(ModuleInterfaceOptions &Opts,
Args.hasArg(OPT_experimental_spi_imports);
Opts.DebugPrintInvalidSyntax |=
Args.hasArg(OPT_debug_emit_invalid_swiftinterface_syntax);
if (const Arg *A = Args.getLastArg(OPT_library_level)) {
StringRef contents = A->getValue();
if (contents == "spi") {
Opts.PrintSPIs = true;
}
}
}
/// Save a copy of any flags marked as ModuleInterfaceOption, if running