[Frontend|NFC] Rename ModuleInterfaceOptions::PrintPrivateInterfaceContent

This commit is contained in:
Alexis Laferrière
2022-12-08 14:04:24 -08:00
parent 62b26b1b0f
commit 010973c276
4 changed files with 9 additions and 8 deletions

View File

@@ -225,7 +225,7 @@ static void printImports(raw_ostream &out,
// imports only if they are also SPI. First, list all implementation-only
// imports and filter them later.
llvm::SmallSet<ImportedModule, 4, ImportedModule::Order> ioiImportSet;
if (Opts.PrintSPIs && Opts.ExperimentalSPIImports) {
if (Opts.PrintPrivateInterfaceContent && Opts.ExperimentalSPIImports) {
SmallVector<ImportedModule, 4> ioiImports, allImports;
M->getImportedModules(ioiImports,
@@ -246,7 +246,7 @@ static void printImports(raw_ostream &out,
/// Collect @_spiOnly imports that are not imported elsewhere publicly.
llvm::SmallSet<ImportedModule, 4, ImportedModule::Order> spiOnlyImportSet;
if (Opts.PrintSPIs) {
if (Opts.PrintPrivateInterfaceContent) {
SmallVector<ImportedModule, 4> spiOnlyImports, otherImports;
M->getImportedModules(spiOnlyImports,
ModuleDecl::ImportFilterKind::SPIOnly);
@@ -305,7 +305,7 @@ static void printImports(raw_ostream &out,
if (publicImportSet.count(import))
out << "@_exported ";
if (Opts.PrintSPIs) {
if (Opts.PrintPrivateInterfaceContent) {
// An import visible in the private swiftinterface only.
//
// In the long term, we want to print this attribute for consistency and
@@ -789,7 +789,8 @@ bool swift::emitSwiftInterface(raw_ostream &out,
printImports(out, Opts, M);
const PrintOptions printOptions = PrintOptions::printSwiftInterfaceFile(
M, Opts.PreserveTypesAsWritten, Opts.PrintFullConvention, Opts.PrintSPIs,
M, Opts.PreserveTypesAsWritten, Opts.PrintFullConvention,
Opts.PrintPrivateInterfaceContent,
Opts.AliasModuleNames, &aliasModuleNamesTargets);
InheritedProtocolCollector::PerTypeMap inheritedProtocolMap;