[Frontend] Allow -typecheck-module-from-interface to emit no outputs

-typecheck-module-from-interface doesn't emit textual output as
configured in frontend option. The real output is diagnostics but that
is not tracked by output computer which is using the option.

Teach `swift-frontend` that it doesn't actually emit any real output and
tell serialization not to emit swiftmodule.
This commit is contained in:
Steven Wu
2023-07-17 16:38:15 -07:00
parent 43add116d2
commit 411937d653
4 changed files with 8 additions and 6 deletions

View File

@@ -65,8 +65,10 @@ void swift::serializeToBuffers(
std::unique_ptr<llvm::MemoryBuffer> *moduleDocBuffer,
std::unique_ptr<llvm::MemoryBuffer> *moduleSourceInfoBuffer,
const SILModule *M) {
// Serialization output is disabled.
if (options.OutputPath.empty())
return;
assert(!options.OutputPath.empty());
{
FrontendStatsTracer tracer(getContext(DC).Stats,
"Serialization, swiftmodule, to buffer");