Skip to content

Commit 55a6693

Browse files
committed
Frontend: -emit-silgen exits with non-zero status code if a diagnostic was emitted
1 parent 33770fa commit 55a6693

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/FrontendTool/FrontendTool.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,8 @@ static bool writeSIL(SILModule &SM, ModuleDecl *M, bool EmitVerboseSIL,
406406
auto OS = getFileOutputStream(OutputFilename, M->getASTContext());
407407
if (!OS) return true;
408408
SM.print(*OS, EmitVerboseSIL, M, SortSIL);
409-
return false;
409+
410+
return M->getASTContext().hadError();
410411
}
411412

412413
static bool writeSIL(SILModule &SM, const PrimarySpecificPaths &PSPs,

0 commit comments

Comments
 (0)