Skip to content

Commit b91df70

Browse files
authored
Merge pull request #10763 from benlangmuir/handle-output-file-errors
[clang][cas] Handle CAS errors from OutputFile::keep()
2 parents a7e62b8 + f2b5016 commit b91df70

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

clang/lib/Frontend/CompilerInstance.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -898,6 +898,10 @@ void CompilerInstance::clearOutputFiles(bool EraseFiles) {
898898
[&](const llvm::vfs::OutputError &E) {
899899
getDiagnostics().Report(diag::err_fe_unable_to_open_output)
900900
<< E.getOutputPath() << E.convertToErrorCode().message();
901+
},
902+
[&](const llvm::ErrorInfoBase &EIB) { // Handle any remaining error
903+
getDiagnostics().Report(diag::err_fe_unable_to_open_output)
904+
<< O.getPath() << EIB.message();
901905
});
902906
}
903907
OutputFiles.clear();

0 commit comments

Comments
 (0)