Rename "textual interface" to "parseable interface" (#19713)

We already have something called "module interfaces" -- it's the
generated interface view that you can see in Xcode, the interface
that's meant for developers using a library. Of course, that's also a
textual format. To reduce confusion, rename the new module stability
feature to "parseable [module] interfaces".
This commit is contained in:
Jordan Rose
2018-10-04 17:49:55 -07:00
committed by GitHub
parent 01c4c3c12b
commit 73d5ebaad2
55 changed files with 75 additions and 72 deletions

View File

@@ -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());
}