Author: Duncan P. N. Exon Smith Date: 2020-12-15T14:21:37-08:00 New Revision: 0eb4378290ffcd5da650217df3ac3b8c473d5ed6
URL: https://github.com/llvm/llvm-project/commit/0eb4378290ffcd5da650217df3ac3b8c473d5ed6 DIFF: https://github.com/llvm/llvm-project/commit/0eb4378290ffcd5da650217df3ac3b8c473d5ed6.diff LOG: Frontend: Fix confusing comment at call to clearOutputFiles, NFC Fix the comment in front of `compileModuleImpl`'s call to `CompilerInstance::clearOutputFiles`. The purpose of this call is to delete any stray temporary files after the module generation thread crashes. The comment is from f545f67de3a1bfdbbfad88acde5b540ce3b82f4f, and was associated with manually deleting a generated module map. Then 13afbf42d830dd43febbeb0855aa359ca9dbfbf9 added this `clearOutputFiles` call between the comment and the code it referenced. Finally, 1f76c4e8101b9beaf8f1b10a57faa80256ab2b05 started sending the generated module map directly to the SourceManager instead of putting it on disk, deleting the call that the comment referenced. No functionality change. Added: Modified: clang/lib/Frontend/CompilerInstance.cpp Removed: ################################################################################ diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index 17875a2ed85b..69e2e554d018 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/lib/Frontend/CompilerInstance.cpp @@ -1182,10 +1182,8 @@ compileModuleImpl(CompilerInstance &ImportingInstance, SourceLocation ImportLoc, diag::remark_module_build_done) << ModuleName; - // Delete the temporary module map file. - // FIXME: Even though we're executing under crash protection, it would still - // be nice to do this with RemoveFileOnSignal when we can. However, that - // doesn't make sense for all clients, so clean this up manually. + // Delete any remaining temporary files related to Instance, in case the + // module generation thread crashed. Instance.clearOutputFiles(/*EraseFiles=*/true); return !Instance.getDiagnostics().hasErrorOccurred(); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits