diff --git a/include/swift/AST/DiagnosticsFrontend.def b/include/swift/AST/DiagnosticsFrontend.def index da1ab90b3d654..9b3fbe4a84b50 100644 --- a/include/swift/AST/DiagnosticsFrontend.def +++ b/include/swift/AST/DiagnosticsFrontend.def @@ -121,7 +121,7 @@ ERROR(error_mode_cannot_emit_module,none, ERROR(error_mode_cannot_emit_module_doc,none, "this mode does not support emitting module documentation files", ()) ERROR(error_mode_cannot_emit_interface,none, - "this mode does not support emitting textual interface files", ()) + "this mode does not support emitting parseable interface files", ()) WARNING(emit_reference_dependencies_without_primary_file,none, "ignoring -emit-reference-dependencies (requires -primary-file)", ()) @@ -260,8 +260,8 @@ ERROR(error_invalid_debug_prefix_map, none, ERROR(invalid_vfs_overlay_file,none, "invalid virtual overlay file '%0'", (StringRef)) -WARNING(textual_interface_scoped_import_unsupported,none, - "scoped imports are not yet supported in textual module interfaces", +WARNING(parseable_interface_scoped_import_unsupported,none, + "scoped imports are not yet supported in parseable module interfaces", ()) #ifndef DIAG_NO_UNDEF diff --git a/include/swift/AST/PrintOptions.h b/include/swift/AST/PrintOptions.h index 470ba18ded7c0..d986ede435939 100644 --- a/include/swift/AST/PrintOptions.h +++ b/include/swift/AST/PrintOptions.h @@ -449,13 +449,13 @@ struct PrintOptions { return result; } - /// Retrieve the set of options suitable for stable textual interfaces. + /// Retrieve the set of options suitable for parseable module interfaces. /// /// This is a format that will be parsed again later, so the output must be /// consistent and well-formed. /// - /// \see swift::emitModuleInterface - static PrintOptions printTextualInterfaceFile(); + /// \see swift::emitParseableInterface + static PrintOptions printParseableInterfaceFile(); static PrintOptions printModuleInterface(); static PrintOptions printTypeInterface(Type T); diff --git a/include/swift/Basic/SupplementaryOutputPaths.h b/include/swift/Basic/SupplementaryOutputPaths.h index 1250f2bcb75ae..d38a9d3384807 100644 --- a/include/swift/Basic/SupplementaryOutputPaths.h +++ b/include/swift/Basic/SupplementaryOutputPaths.h @@ -113,16 +113,16 @@ struct SupplementaryOutputPaths { /// \sa swift::writeTBDFile std::string TBDPath; - /// The path to which we should emit a textual module interface, which can be - /// used by a client source file to import this module. + /// The path to which we should emit a parseable module interface, which can + /// be used by a client source file to import this module. /// /// This format is similar to the binary format used for #ModuleOutputPath, /// but is intended to be stable across compiler versions. /// /// Currently only makes sense when the compiler has whole-module knowledge. /// - /// \sa swift::emitModuleInterface - std::string ModuleInterfaceOutputPath; + /// \sa swift::emitParseableInterface + std::string ParseableInterfaceOutputPath; SupplementaryOutputPaths() = default; SupplementaryOutputPaths(const SupplementaryOutputPaths &) = default; @@ -132,7 +132,7 @@ struct SupplementaryOutputPaths { ModuleDocOutputPath.empty() && DependenciesFilePath.empty() && ReferenceDependenciesFilePath.empty() && SerializedDiagnosticsPath.empty() && LoadedModuleTracePath.empty() && - TBDPath.empty() && ModuleInterfaceOutputPath.empty(); + TBDPath.empty() && ParseableInterfaceOutputPath.empty(); } }; } // namespace swift diff --git a/include/swift/Driver/Driver.h b/include/swift/Driver/Driver.h index 4eb6f2ef0d18e..c254ba99dfd07 100644 --- a/include/swift/Driver/Driver.h +++ b/include/swift/Driver/Driver.h @@ -341,10 +341,10 @@ class Driver { StringRef workingDirectory, CommandOutput *Output) const; - void chooseTextualInterfacePath(Compilation &C, const JobAction *JA, - StringRef workingDirectory, - llvm::SmallString<128> &buffer, - CommandOutput *output) const; + void chooseParseableInterfacePath(Compilation &C, const JobAction *JA, + StringRef workingDirectory, + llvm::SmallString<128> &buffer, + CommandOutput *output) const; void chooseRemappingOutputPath(Compilation &C, const TypeToPathMap *OutputMap, CommandOutput *Output) const; diff --git a/include/swift/Frontend/Frontend.h b/include/swift/Frontend/Frontend.h index fa9dc2770e533..e9ec21cd8e9fe 100644 --- a/include/swift/Frontend/Frontend.h +++ b/include/swift/Frontend/Frontend.h @@ -338,10 +338,10 @@ class CompilerInvocation { /// if not in that mode. std::string getTBDPathForWholeModule() const; - /// ModuleInterfaceOutputPath only makes sense in whole module compilation - /// mode, so return the ModuleInterfaceOutputPath when in that mode and fail - /// an assert if not in that mode. - std::string getModuleInterfaceOutputPathForWholeModule() const; + /// ParseableInterfaceOutputPath only makes sense in whole module compilation + /// mode, so return the ParseableInterfaceOutputPath when in that mode and + /// fail an assert if not in that mode. + std::string getParseableInterfaceOutputPathForWholeModule() const; }; /// A class which manages the state and execution of the compiler. diff --git a/include/swift/Frontend/FrontendInputsAndOutputs.h b/include/swift/Frontend/FrontendInputsAndOutputs.h index bd44363af5322..8da716bdfaaa2 100644 --- a/include/swift/Frontend/FrontendInputsAndOutputs.h +++ b/include/swift/Frontend/FrontendInputsAndOutputs.h @@ -235,7 +235,7 @@ class FrontendInputsAndOutputs { bool hasLoadedModuleTracePath() const; bool hasModuleOutputPath() const; bool hasModuleDocOutputPath() const; - bool hasModuleInterfaceOutputPath() const; + bool hasParseableInterfaceOutputPath() const; bool hasTBDPath() const; bool hasDependencyTrackerPath() const; diff --git a/include/swift/Option/FrontendOptions.td b/include/swift/Option/FrontendOptions.td index 03f19865b738a..5b428d2f1e04b 100644 --- a/include/swift/Option/FrontendOptions.td +++ b/include/swift/Option/FrontendOptions.td @@ -65,7 +65,7 @@ def emit_fixits_path def emit_interface_path : Separate<["-"], "emit-interface-path">, MetaVarName<"">, - HelpText<"Output textual interface file to ">; + HelpText<"Output parseable interface file to ">; def tbd_install_name : Separate<["-"], "tbd-install_name">, MetaVarName<"">, diff --git a/include/swift/Option/Options.td b/include/swift/Option/Options.td index 43dc4ec1c90bf..d9f550a1f183f 100644 --- a/include/swift/Option/Options.td +++ b/include/swift/Option/Options.td @@ -302,7 +302,7 @@ def emit_module_path_EQ : Joined<["-"], "emit-module-path=">, def experimental_emit_interface : Flag<["-"], "experimental-emit-interface">, Flags<[NoInteractiveOption, HelpHidden]>, - HelpText<"Test out the textual interfaces feature">; + HelpText<"Test out the parseable interfaces feature">; def emit_objc_header : Flag<["-"], "emit-objc-header">, Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild]>, diff --git a/lib/AST/ASTPrinter.cpp b/lib/AST/ASTPrinter.cpp index 4707ce55f5b07..ee5475c09698d 100644 --- a/lib/AST/ASTPrinter.cpp +++ b/lib/AST/ASTPrinter.cpp @@ -79,7 +79,7 @@ static bool contributesToParentTypeStorage(const AbstractStorageDecl *ASD) { return !ND->isResilient() && ASD->hasStorage() && !ASD->isStatic(); } -PrintOptions PrintOptions::printTextualInterfaceFile() { +PrintOptions PrintOptions::printParseableInterfaceFile() { PrintOptions result; result.PrintLongAttrsOnSeparateLines = true; result.TypeDefinitions = true; @@ -100,7 +100,7 @@ PrintOptions PrintOptions::printTextualInterfaceFile() { printer << " " << AFD->getInlinableBodyText(scratch); }; - class ShouldPrintForTextualInterface : public ShouldPrintChecker { + class ShouldPrintForParseableInterface : public ShouldPrintChecker { bool shouldPrint(const Decl *D, const PrintOptions &options) override { // Skip anything that isn't 'public' or '@usableFromInline'. if (auto *VD = dyn_cast(D)) { @@ -143,7 +143,7 @@ PrintOptions PrintOptions::printTextualInterfaceFile() { } }; result.CurrentPrintabilityChecker = - std::make_shared(); + std::make_shared(); // FIXME: We don't really need 'public' on everything; we could just change // the default to 'public' and mark the 'internal' things. diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp index c02f21e2bbba9..b3ece6d0096d2 100644 --- a/lib/Driver/Driver.cpp +++ b/lib/Driver/Driver.cpp @@ -2474,7 +2474,7 @@ Job *Driver::buildJobsForAction(Compilation &C, const JobAction *JA, Output.get()); if (C.getArgs().hasArg(options::OPT_experimental_emit_interface)) - chooseTextualInterfacePath(C, JA, workingDirectory, Buf, Output.get()); + chooseParseableInterfacePath(C, JA, workingDirectory, Buf, Output.get()); if (C.getArgs().hasArg(options::OPT_update_code) && isa(JA)) chooseRemappingOutputPath(C, OutputMap, Output.get()); @@ -2772,7 +2772,7 @@ void Driver::chooseRemappingOutputPath(Compilation &C, } } -void Driver::chooseTextualInterfacePath(Compilation &C, const JobAction *JA, +void Driver::chooseParseableInterfacePath(Compilation &C, const JobAction *JA, StringRef workingDirectory, llvm::SmallString<128> &buffer, CommandOutput *output) const { diff --git a/lib/Frontend/ArgsToFrontendOptionsConverter.cpp b/lib/Frontend/ArgsToFrontendOptionsConverter.cpp index 0b5ed1380e5f2..9066d85f39eef 100644 --- a/lib/Frontend/ArgsToFrontendOptionsConverter.cpp +++ b/lib/Frontend/ArgsToFrontendOptionsConverter.cpp @@ -496,7 +496,7 @@ bool ArgsToFrontendOptionsConverter::checkUnusedSupplementaryOutputPaths() return true; } if (!FrontendOptions::canActionEmitInterface(Opts.RequestedAction) && - Opts.InputsAndOutputs.hasModuleInterfaceOutputPath()) { + Opts.InputsAndOutputs.hasParseableInterfaceOutputPath()) { Diags.diagnose(SourceLoc(), diag::error_mode_cannot_emit_interface); return true; } diff --git a/lib/Frontend/ArgsToFrontendOutputsConverter.cpp b/lib/Frontend/ArgsToFrontendOutputsConverter.cpp index bcceda66e6648..c87f62ef67337 100644 --- a/lib/Frontend/ArgsToFrontendOutputsConverter.cpp +++ b/lib/Frontend/ArgsToFrontendOutputsConverter.cpp @@ -294,13 +294,13 @@ SupplementaryOutputPathsComputer::getSupplementaryOutputPathsFromArguments() auto loadedModuleTrace = getSupplementaryFilenamesFromArguments( options::OPT_emit_loaded_module_trace_path); auto TBD = getSupplementaryFilenamesFromArguments(options::OPT_emit_tbd_path); - auto moduleInterfaceOutput = getSupplementaryFilenamesFromArguments( + auto parseableInterfaceOutput = getSupplementaryFilenamesFromArguments( options::OPT_emit_interface_path); if (!objCHeaderOutput || !moduleOutput || !moduleDocOutput || !dependenciesFile || !referenceDependenciesFile || !serializedDiagnostics || !fixItsOutput || !loadedModuleTrace || !TBD || - !moduleInterfaceOutput) { + !parseableInterfaceOutput) { return None; } std::vector result; @@ -318,7 +318,7 @@ SupplementaryOutputPathsComputer::getSupplementaryOutputPathsFromArguments() sop.FixItsOutputPath = (*fixItsOutput)[i]; sop.LoadedModuleTracePath = (*loadedModuleTrace)[i]; sop.TBDPath = (*TBD)[i]; - sop.ModuleInterfaceOutputPath = (*moduleInterfaceOutput)[i]; + sop.ParseableInterfaceOutputPath = (*parseableInterfaceOutput)[i]; result.push_back(sop); } @@ -395,7 +395,8 @@ SupplementaryOutputPathsComputer::computeOutputPathsForOneInput( defaultSupplementaryOutputPathExcludingExtension); // There is no non-path form of -emit-interface-path - auto moduleInterfaceOutputPath = pathsFromArguments.ModuleInterfaceOutputPath; + auto parseableInterfaceOutputPath = + pathsFromArguments.ParseableInterfaceOutputPath; ID emitModuleOption; std::string moduleExtension; @@ -418,7 +419,7 @@ SupplementaryOutputPathsComputer::computeOutputPathsForOneInput( sop.FixItsOutputPath = fixItsOutputPath; sop.LoadedModuleTracePath = loadedModuleTracePath; sop.TBDPath = tbdPath; - sop.ModuleInterfaceOutputPath = moduleInterfaceOutputPath; + sop.ParseableInterfaceOutputPath = parseableInterfaceOutputPath; return sop; } @@ -493,7 +494,8 @@ createFromTypeToPathMap(const TypeToPathMap *map) { {file_types::TY_SerializedDiagnostics, paths.SerializedDiagnosticsPath}, {file_types::TY_ModuleTrace, paths.LoadedModuleTracePath}, {file_types::TY_TBD, paths.TBDPath}, - {file_types::TY_SwiftModuleInterfaceFile,paths.ModuleInterfaceOutputPath} + {file_types::TY_SwiftModuleInterfaceFile, + paths.ParseableInterfaceOutputPath} }; for (const std::pair &typeAndString : typesAndStrings) { diff --git a/lib/Frontend/Frontend.cpp b/lib/Frontend/Frontend.cpp index 90e0721deed80..fc814ce71b401 100644 --- a/lib/Frontend/Frontend.cpp +++ b/lib/Frontend/Frontend.cpp @@ -110,12 +110,12 @@ std::string CompilerInvocation::getTBDPathForWholeModule() const { } std::string -CompilerInvocation::getModuleInterfaceOutputPathForWholeModule() const { +CompilerInvocation::getParseableInterfaceOutputPathForWholeModule() const { assert(getFrontendOptions().InputsAndOutputs.isWholeModule() && - "ModuleInterfaceOutputPath only makes sense when the whole module can " - "be seen"); + "ParseableInterfaceOutputPath only makes sense when the whole module " + "can be seen"); return getPrimarySpecificPathsForAtMostOnePrimary() - .SupplementaryOutputs.ModuleInterfaceOutputPath; + .SupplementaryOutputs.ParseableInterfaceOutputPath; } void CompilerInstance::createSILModule() { diff --git a/lib/Frontend/FrontendInputsAndOutputs.cpp b/lib/Frontend/FrontendInputsAndOutputs.cpp index ed018a0e4fa5e..89fb869ea9445 100644 --- a/lib/Frontend/FrontendInputsAndOutputs.cpp +++ b/lib/Frontend/FrontendInputsAndOutputs.cpp @@ -435,10 +435,10 @@ bool FrontendInputsAndOutputs::hasModuleDocOutputPath() const { return outs.ModuleDocOutputPath; }); } -bool FrontendInputsAndOutputs::hasModuleInterfaceOutputPath() const { +bool FrontendInputsAndOutputs::hasParseableInterfaceOutputPath() const { return hasSupplementaryOutputPath( [](const SupplementaryOutputPaths &outs) -> const std::string & { - return outs.ModuleInterfaceOutputPath; + return outs.ParseableInterfaceOutputPath; }); } bool FrontendInputsAndOutputs::hasTBDPath() const { diff --git a/lib/Frontend/FrontendOptions.cpp b/lib/Frontend/FrontendOptions.cpp index ddf88b0795cce..a43b85a642314 100644 --- a/lib/Frontend/FrontendOptions.cpp +++ b/lib/Frontend/FrontendOptions.cpp @@ -124,7 +124,7 @@ void FrontendOptions::forAllOutputPaths( input.getPrimarySpecificPaths().SupplementaryOutputs; const std::string *outputs[] = {&outs.ModuleOutputPath, &outs.ModuleDocOutputPath, - &outs.ModuleInterfaceOutputPath, + &outs.ParseableInterfaceOutputPath, &outs.ObjCHeaderOutputPath}; for (const std::string *next : outputs) { if (!next->empty()) diff --git a/lib/FrontendTool/CMakeLists.txt b/lib/FrontendTool/CMakeLists.txt index bd59765bddfb8..6fe3137231b99 100644 --- a/lib/FrontendTool/CMakeLists.txt +++ b/lib/FrontendTool/CMakeLists.txt @@ -3,7 +3,7 @@ add_swift_library(swiftFrontendTool STATIC ImportedModules.cpp ReferenceDependencies.cpp TBD.cpp - TextualInterfaceGeneration.cpp + ParseableInterfaceGeneration.cpp DEPENDS swift-syntax-generated-headers SwiftOptions LINK_LIBRARIES diff --git a/lib/FrontendTool/FrontendTool.cpp b/lib/FrontendTool/FrontendTool.cpp index 6bc9751af0d66..e4cf45fa8fa15 100644 --- a/lib/FrontendTool/FrontendTool.cpp +++ b/lib/FrontendTool/FrontendTool.cpp @@ -24,7 +24,7 @@ #include "ImportedModules.h" #include "ReferenceDependencies.h" #include "TBD.h" -#include "TextualInterfaceGeneration.h" +#include "ParseableInterfaceGeneration.h" #include "swift/Subsystems.h" #include "swift/AST/ASTScope.h" @@ -356,19 +356,20 @@ static bool printAsObjCIfNeeded(StringRef outputPath, ModuleDecl *M, }); } -/// Prints the stable textual interface for \p M to \p outputPath. +/// Prints the stable parseable interface for \p M to \p outputPath. /// /// ...unless \p outputPath is empty, in which case it does nothing. /// /// \returns true if there were any errors /// -/// \see swift::emitModuleInterface -static bool printModuleInterfaceIfNeeded(StringRef outputPath, ModuleDecl *M) { +/// \see swift::emitParseableInterface +static bool printParseableInterfaceIfNeeded(StringRef outputPath, + ModuleDecl *M) { if (outputPath.empty()) return false; return atomicallyWritingToTextFile(outputPath, M->getDiags(), [M](raw_ostream &out) -> bool { - return swift::emitModuleInterface(out, M); + return swift::emitParseableInterface(out, M); }); } @@ -888,9 +889,9 @@ static bool emitAnyWholeModulePostTypeCheckSupplementaryOutputs( Instance.getMainModule(), opts.ImplicitObjCHeaderPath, moduleIsPublic); } - if (opts.InputsAndOutputs.hasModuleInterfaceOutputPath()) { - hadAnyError |= printModuleInterfaceIfNeeded( - Invocation.getModuleInterfaceOutputPathForWholeModule(), + if (opts.InputsAndOutputs.hasParseableInterfaceOutputPath()) { + hadAnyError |= printParseableInterfaceIfNeeded( + Invocation.getParseableInterfaceOutputPathForWholeModule(), Instance.getMainModule()); } diff --git a/lib/FrontendTool/TextualInterfaceGeneration.cpp b/lib/FrontendTool/ParseableInterfaceGeneration.cpp similarity index 88% rename from lib/FrontendTool/TextualInterfaceGeneration.cpp rename to lib/FrontendTool/ParseableInterfaceGeneration.cpp index 37e592697315a..fc4ca367a5759 100644 --- a/lib/FrontendTool/TextualInterfaceGeneration.cpp +++ b/lib/FrontendTool/ParseableInterfaceGeneration.cpp @@ -1,4 +1,4 @@ -//===--- TextualInterfaceGeneration.cpp - swiftinterface files ------------===// +//===--- ParseableInterfaceGeneration.cpp - swiftinterface files ----------===// // // This source file is part of the Swift.org open source project // @@ -10,7 +10,7 @@ // //===----------------------------------------------------------------------===// -#include "TextualInterfaceGeneration.h" +#include "ParseableInterfaceGeneration.h" #include "swift/AST/ASTContext.h" #include "swift/AST/Decl.h" @@ -21,7 +21,7 @@ using namespace swift; /// Diagnose any scoped imports in \p imports, i.e. those with a non-empty -/// access path. These are not yet supported by textual interfaces, since the +/// access path. These are not yet supported by parseable interfaces, since the /// information about the declaration kind is not preserved through the binary /// serialization that happens as an intermediate step in non-whole-module /// builds. @@ -33,7 +33,7 @@ static void diagnoseScopedImports(DiagnosticEngine &diags, if (importPair.first.empty()) continue; diags.diagnose(importPair.first.front().second, - diag::textual_interface_scoped_import_unsupported); + diag::parseable_interface_scoped_import_unsupported); } } @@ -80,12 +80,12 @@ static void printImports(raw_ostream &out, ModuleDecl *M) { } } -bool swift::emitModuleInterface(raw_ostream &out, ModuleDecl *M) { +bool swift::emitParseableInterface(raw_ostream &out, ModuleDecl *M) { assert(M); printImports(out, M); - const PrintOptions printOptions = PrintOptions::printTextualInterfaceFile(); + const PrintOptions printOptions = PrintOptions::printParseableInterfaceFile(); SmallVector topLevelDecls; M->getTopLevelDecls(topLevelDecls); for (const Decl *D : topLevelDecls) { diff --git a/lib/FrontendTool/TextualInterfaceGeneration.h b/lib/FrontendTool/ParseableInterfaceGeneration.h similarity index 75% rename from lib/FrontendTool/TextualInterfaceGeneration.h rename to lib/FrontendTool/ParseableInterfaceGeneration.h index babad4b1ea138..846b8fd8869fa 100644 --- a/lib/FrontendTool/TextualInterfaceGeneration.h +++ b/lib/FrontendTool/ParseableInterfaceGeneration.h @@ -1,4 +1,4 @@ -//===--- TextualInterfaceGeneration.h - swiftinterface files ----*- C++ -*-===// +//===--- ParseableInterfaceGeneration.h - swiftinterface files --*- C++ -*-===// // // This source file is part of the Swift.org open source project // @@ -10,8 +10,8 @@ // //===----------------------------------------------------------------------===// -#ifndef SWIFT_FRONTENDTOOL_TEXTUALINTERFACEGENERATION_H -#define SWIFT_FRONTENDTOOL_TEXTUALINTERFACEGENERATION_H +#ifndef SWIFT_FRONTENDTOOL_PARSEABLEINTERFACEGENERATION_H +#define SWIFT_FRONTENDTOOL_PARSEABLEINTERFACEGENERATION_H #include "swift/Basic/LLVM.h" @@ -19,7 +19,7 @@ namespace swift { class ModuleDecl; -/// Emit a stable, textual interface for \p M, which can be used by a client +/// Emit a stable, parseable interface for \p M, which can be used by a client /// source file to import this module. /// /// Unlike a serialized module, the textual format generated by @@ -32,7 +32,7 @@ class ModuleDecl; /// \return true if an error occurred /// /// \sa swift::serialize -bool emitModuleInterface(raw_ostream &out, ModuleDecl *M); +bool emitParseableInterface(raw_ostream &out, ModuleDecl *M); } // end namespace swift diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp index f732631a9cd9e..7691baa293cea 100644 --- a/lib/Parse/ParseDecl.cpp +++ b/lib/Parse/ParseDecl.cpp @@ -4273,7 +4273,7 @@ bool Parser::parseGetSet(ParseDeclOptions Flags, assert(Tok.is(tok::l_brace)); // Properties in protocols use a very limited syntax. - // SIL mode and textual interfaces use the same syntax. + // SIL mode and parseable interfaces use the same syntax. // Otherwise, we have a normal var or subscript declaration and we need // parse the full complement of specifiers, along with their bodies. bool parsingLimitedSyntax = Flags.contains(PD_InProtocol) || @@ -4396,7 +4396,7 @@ bool Parser::parseGetSet(ParseDeclOptions Flags, // It's okay not to have a body if there's an external asm name. if (!Tok.is(tok::l_brace)) { - // Accessors don't need bodies in textual interfaces + // Accessors don't need bodies in parseable interfaces if (SF.Kind == SourceFileKind::Interface) continue; // _silgen_name'd accessors don't need bodies. @@ -6404,7 +6404,7 @@ parseDeclDeinit(ParseDeclOptions Flags, DeclAttributes &Attributes) { switch (SF.Kind) { case SourceFileKind::Interface: case SourceFileKind::SIL: - // It's okay to have no body for SIL code or textual interfaces. + // It's okay to have no body for SIL code or parseable interfaces. break; case SourceFileKind::Library: case SourceFileKind::Main: diff --git a/lib/Sema/TypeCheckDecl.cpp b/lib/Sema/TypeCheckDecl.cpp index c0845c7087c56..855ac55f754ef 100644 --- a/lib/Sema/TypeCheckDecl.cpp +++ b/lib/Sema/TypeCheckDecl.cpp @@ -2583,7 +2583,7 @@ class DeclChecker : public DeclVisitor { // Static/class declarations require an initializer unless in a // protocol. if (var->isStatic() && !isa(varDC)) { - // ...but don't enforce this for SIL or textual interface files. + // ...but don't enforce this for SIL or parseable interface files. switch (varDC->getParentSourceFile()->Kind) { case SourceFileKind::Interface: case SourceFileKind::SIL: @@ -3123,7 +3123,7 @@ class DeclChecker : public DeclVisitor { return false; } - // Declarations in SIL and textual interface files don't require + // Declarations in SIL and parseable interface files don't require // definitions. if (auto sourceFile = decl->getDeclContext()->getParentSourceFile()) { switch (sourceFile->Kind) { @@ -5181,7 +5181,7 @@ static void diagnoseClassWithoutInitializers(TypeChecker &tc, void TypeChecker::maybeDiagnoseClassWithoutInitializers(ClassDecl *classDecl) { if (auto *SF = classDecl->getParentSourceFile()) { - // Allow classes without initializers in SIL and textual interface files. + // Allow classes without initializers in SIL and parseable interface files. switch (SF->Kind) { case SourceFileKind::SIL: case SourceFileKind::Interface: @@ -5316,7 +5316,7 @@ void TypeChecker::addImplicitConstructors(NominalTypeDecl *decl) { if (decl->isInvalid()) return; - // Don't add implicit constructors in textual interfaces. + // Don't add implicit constructors in parseable interfaces. if (auto *SF = decl->getParentSourceFile()) { if (SF->Kind == SourceFileKind::Interface) { decl->setAddedImplicitInitializers(); diff --git a/lib/Sema/TypeCheckProtocol.cpp b/lib/Sema/TypeCheckProtocol.cpp index 6e7d568fc9e2d..246e0986423e8 100644 --- a/lib/Sema/TypeCheckProtocol.cpp +++ b/lib/Sema/TypeCheckProtocol.cpp @@ -1092,7 +1092,7 @@ bool WitnessChecker::findBestWitness( } if (numViable == 0) { - // Assume any missing value witnesses for a conformance in a textual + // Assume any missing value witnesses for a conformance in a parseable // interface can be treated as opaque. // FIXME: ...but we should do something better about types. if (conformance && !conformance->isInvalid()) { diff --git a/test/Frontend/supplementary-output-support.swift b/test/Frontend/supplementary-output-support.swift index c77dbe9bb3e66..b7f7ec2309358 100644 --- a/test/Frontend/supplementary-output-support.swift +++ b/test/Frontend/supplementary-output-support.swift @@ -25,6 +25,6 @@ // RESOLVE_IMPORTS_NO_OBJC_HEADER: error: this mode does not support emitting Objective-C headers{{$}} // RUN: not %target-swift-frontend -parse -emit-interface-path %t %s 2>&1 | %FileCheck -check-prefix=PARSE_NO_INTERFACE %s -// PARSE_NO_INTERFACE: error: this mode does not support emitting textual interface files{{$}} +// PARSE_NO_INTERFACE: error: this mode does not support emitting parseable interface files{{$}} // RUN: not %target-swift-frontend -emit-silgen -emit-interface-path %t %s 2>&1 | %FileCheck -check-prefix=SILGEN_NO_INTERFACE %s -// SILGEN_NO_INTERFACE: error: this mode does not support emitting textual interface files{{$}} +// SILGEN_NO_INTERFACE: error: this mode does not support emitting parseable interface files{{$}} diff --git a/test/ModuleInterface/Conformances.swiftinterface b/test/ParseableInterface/Conformances.swiftinterface similarity index 100% rename from test/ModuleInterface/Conformances.swiftinterface rename to test/ParseableInterface/Conformances.swiftinterface diff --git a/test/ModuleInterface/DefaultArgs.swiftinterface b/test/ParseableInterface/DefaultArgs.swiftinterface similarity index 100% rename from test/ModuleInterface/DefaultArgs.swiftinterface rename to test/ParseableInterface/DefaultArgs.swiftinterface diff --git a/test/ModuleInterface/Inputs/ConformancesUser.swift b/test/ParseableInterface/Inputs/ConformancesUser.swift similarity index 100% rename from test/ModuleInterface/Inputs/ConformancesUser.swift rename to test/ParseableInterface/Inputs/ConformancesUser.swift diff --git a/test/ModuleInterface/Inputs/imports-clang-modules/A.h b/test/ParseableInterface/Inputs/imports-clang-modules/A.h similarity index 100% rename from test/ModuleInterface/Inputs/imports-clang-modules/A.h rename to test/ParseableInterface/Inputs/imports-clang-modules/A.h diff --git a/test/ModuleInterface/Inputs/imports-clang-modules/B1.h b/test/ParseableInterface/Inputs/imports-clang-modules/B1.h similarity index 100% rename from test/ModuleInterface/Inputs/imports-clang-modules/B1.h rename to test/ParseableInterface/Inputs/imports-clang-modules/B1.h diff --git a/test/ModuleInterface/Inputs/imports-clang-modules/B2.h b/test/ParseableInterface/Inputs/imports-clang-modules/B2.h similarity index 100% rename from test/ModuleInterface/Inputs/imports-clang-modules/B2.h rename to test/ParseableInterface/Inputs/imports-clang-modules/B2.h diff --git a/test/ModuleInterface/Inputs/imports-clang-modules/B3.h b/test/ParseableInterface/Inputs/imports-clang-modules/B3.h similarity index 100% rename from test/ModuleInterface/Inputs/imports-clang-modules/B3.h rename to test/ParseableInterface/Inputs/imports-clang-modules/B3.h diff --git a/test/ModuleInterface/Inputs/imports-clang-modules/C.h b/test/ParseableInterface/Inputs/imports-clang-modules/C.h similarity index 100% rename from test/ModuleInterface/Inputs/imports-clang-modules/C.h rename to test/ParseableInterface/Inputs/imports-clang-modules/C.h diff --git a/test/ModuleInterface/Inputs/imports-clang-modules/D.h b/test/ParseableInterface/Inputs/imports-clang-modules/D.h similarity index 100% rename from test/ModuleInterface/Inputs/imports-clang-modules/D.h rename to test/ParseableInterface/Inputs/imports-clang-modules/D.h diff --git a/test/ModuleInterface/Inputs/imports-clang-modules/module.modulemap b/test/ParseableInterface/Inputs/imports-clang-modules/module.modulemap similarity index 100% rename from test/ModuleInterface/Inputs/imports-clang-modules/module.modulemap rename to test/ParseableInterface/Inputs/imports-clang-modules/module.modulemap diff --git a/test/ModuleInterface/Inputs/imports-other.swift b/test/ParseableInterface/Inputs/imports-other.swift similarity index 100% rename from test/ModuleInterface/Inputs/imports-other.swift rename to test/ParseableInterface/Inputs/imports-other.swift diff --git a/test/ModuleInterface/Inputs/imports-submodule-order/module.modulemap b/test/ParseableInterface/Inputs/imports-submodule-order/module.modulemap similarity index 100% rename from test/ModuleInterface/Inputs/imports-submodule-order/module.modulemap rename to test/ParseableInterface/Inputs/imports-submodule-order/module.modulemap diff --git a/test/ModuleInterface/Inputs/other.swift b/test/ParseableInterface/Inputs/other.swift similarity index 100% rename from test/ModuleInterface/Inputs/other.swift rename to test/ParseableInterface/Inputs/other.swift diff --git a/test/ModuleInterface/ObjC.swiftinterface b/test/ParseableInterface/ObjC.swiftinterface similarity index 100% rename from test/ModuleInterface/ObjC.swiftinterface rename to test/ParseableInterface/ObjC.swiftinterface diff --git a/test/ModuleInterface/SmokeTest.swiftinterface b/test/ParseableInterface/SmokeTest.swiftinterface similarity index 100% rename from test/ModuleInterface/SmokeTest.swiftinterface rename to test/ParseableInterface/SmokeTest.swiftinterface diff --git a/test/ModuleInterface/access-filter.swift b/test/ParseableInterface/access-filter.swift similarity index 100% rename from test/ModuleInterface/access-filter.swift rename to test/ParseableInterface/access-filter.swift diff --git a/test/ModuleInterface/attrs.swift b/test/ParseableInterface/attrs.swift similarity index 100% rename from test/ModuleInterface/attrs.swift rename to test/ParseableInterface/attrs.swift diff --git a/test/ModuleInterface/conformances.swift b/test/ParseableInterface/conformances.swift similarity index 100% rename from test/ModuleInterface/conformances.swift rename to test/ParseableInterface/conformances.swift diff --git a/test/ModuleInterface/dataflow-errors.swift b/test/ParseableInterface/dataflow-errors.swift similarity index 100% rename from test/ModuleInterface/dataflow-errors.swift rename to test/ParseableInterface/dataflow-errors.swift diff --git a/test/ModuleInterface/if-configs.swift b/test/ParseableInterface/if-configs.swift similarity index 100% rename from test/ModuleInterface/if-configs.swift rename to test/ParseableInterface/if-configs.swift diff --git a/test/ModuleInterface/imports-submodule-order.swift b/test/ParseableInterface/imports-submodule-order.swift similarity index 100% rename from test/ModuleInterface/imports-submodule-order.swift rename to test/ParseableInterface/imports-submodule-order.swift diff --git a/test/ModuleInterface/imports.swift b/test/ParseableInterface/imports.swift similarity index 94% rename from test/ModuleInterface/imports.swift rename to test/ParseableInterface/imports.swift index 3858ee378035c..9b3ad04744000 100644 --- a/test/ModuleInterface/imports.swift +++ b/test/ParseableInterface/imports.swift @@ -5,7 +5,7 @@ @_exported import empty import B.B2 -import func C.c // expected-warning {{scoped imports are not yet supported in textual module interfaces}} +import func C.c // expected-warning {{scoped imports are not yet supported in parseable module interfaces}} import D // CHECK-NOT: import diff --git a/test/ModuleInterface/inlinable-function.swift b/test/ParseableInterface/inlinable-function.swift similarity index 100% rename from test/ModuleInterface/inlinable-function.swift rename to test/ParseableInterface/inlinable-function.swift diff --git a/test/ModuleInterface/modifiers.swift b/test/ParseableInterface/modifiers.swift similarity index 100% rename from test/ModuleInterface/modifiers.swift rename to test/ParseableInterface/modifiers.swift diff --git a/test/ModuleInterface/print-from-partial-modules.swift b/test/ParseableInterface/print-from-partial-modules.swift similarity index 100% rename from test/ModuleInterface/print-from-partial-modules.swift rename to test/ParseableInterface/print-from-partial-modules.swift diff --git a/test/ModuleInterface/private-stored-member-type-layout.swift b/test/ParseableInterface/private-stored-member-type-layout.swift similarity index 100% rename from test/ModuleInterface/private-stored-member-type-layout.swift rename to test/ParseableInterface/private-stored-member-type-layout.swift diff --git a/test/ModuleInterface/private-stored-members.swift b/test/ParseableInterface/private-stored-members.swift similarity index 100% rename from test/ModuleInterface/private-stored-members.swift rename to test/ParseableInterface/private-stored-members.swift diff --git a/test/ModuleInterface/smoke-test.swift b/test/ParseableInterface/smoke-test.swift similarity index 100% rename from test/ModuleInterface/smoke-test.swift rename to test/ParseableInterface/smoke-test.swift diff --git a/test/ModuleInterface/stdlib.swift b/test/ParseableInterface/stdlib.swift similarity index 100% rename from test/ModuleInterface/stdlib.swift rename to test/ParseableInterface/stdlib.swift diff --git a/validation-test/ModuleInterface/verify_all_overlays.swift b/validation-test/ParseableInterface/verify_all_overlays.swift similarity index 100% rename from validation-test/ModuleInterface/verify_all_overlays.swift rename to validation-test/ParseableInterface/verify_all_overlays.swift diff --git a/validation-test/ModuleInterface/verify_all_overlays_O.swift b/validation-test/ParseableInterface/verify_all_overlays_O.swift similarity index 100% rename from validation-test/ModuleInterface/verify_all_overlays_O.swift rename to validation-test/ParseableInterface/verify_all_overlays_O.swift diff --git a/validation-test/ModuleInterface/verify_simd.swift b/validation-test/ParseableInterface/verify_simd.swift similarity index 100% rename from validation-test/ModuleInterface/verify_simd.swift rename to validation-test/ParseableInterface/verify_simd.swift