Frontend: -emit-silgen exits with non-zero status code if a diagnostic was emitted

This commit is contained in:
Slava Pestov
2019-10-02 19:26:19 -04:00
parent 33770fa665
commit 55a6693da8

View File

@@ -406,7 +406,8 @@ static bool writeSIL(SILModule &SM, ModuleDecl *M, bool EmitVerboseSIL,
auto OS = getFileOutputStream(OutputFilename, M->getASTContext());
if (!OS) return true;
SM.print(*OS, EmitVerboseSIL, M, SortSIL);
return false;
return M->getASTContext().hadError();
}
static bool writeSIL(SILModule &SM, const PrimarySpecificPaths &PSPs,