Skip to content

Commit 49825a6

Browse files
authored
Merge pull request #10776 from benlangmuir/eng/blangmuir/151077068-output-file-errors
🍒[6.2][clang][cas] Handle CAS errors from OutputFile::keep()
2 parents 88f358a + ae1d65a commit 49825a6

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
@@ -902,6 +902,10 @@ void CompilerInstance::clearOutputFiles(bool EraseFiles) {
902902
[&](const llvm::vfs::OutputError &E) {
903903
getDiagnostics().Report(diag::err_fe_unable_to_open_output)
904904
<< E.getOutputPath() << E.convertToErrorCode().message();
905+
},
906+
[&](const llvm::ErrorInfoBase &EIB) { // Handle any remaining error
907+
getDiagnostics().Report(diag::err_fe_unable_to_open_output)
908+
<< O.getPath() << EIB.message();
905909
});
906910
}
907911
OutputFiles.clear();

0 commit comments

Comments
 (0)