[PATCH] D65545: Handle some fs::remove failures

Jonas Devlieghere via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 7 12:47:24 PDT 2019


JDevlieghere added a comment.

Thanks for looping me in, @vsapsai!



================
Comment at: llvm/include/llvm/Support/FileUtilities.h:52-53
       if (DeleteIt) {
-        // Ignore problems deleting the file.
-        sys::fs::remove(Filename);
+        if (std::error_code EC = sys::fs::remove(Filename))
+          report_fatal_error("failed removing file \"" + Filename + "\": " + EC.message());
       }
----------------
vsapsai wrote:
> For this change opinion of LLDB developers can be useful as it changes existing `FileRemover` behavior.
Aborting isn't acceptable for LLDB. Can we turn this into an assert instead?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65545/new/

https://reviews.llvm.org/D65545





More information about the cfe-commits mailing list