[PATCH] D85690: [split-file] Fix sys::fs::remove() on Solaris after D83834

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 10 15:09:03 PDT 2020


dblaikie added inline comments.


================
Comment at: llvm/tools/split-file/split-file.cpp:158-159
 
   // Delete output if it is a file or an empty directory, so that we can create
   // a directory.
   sys::fs::file_status status;
----------------
Perhaps it should (at least, this was my original idea/suggestion when I proposed this behavior - not sure if I was clear/specified that, though) delete the contents even if it is non-empty. This would help make tests more hermetic/less likely to have the weird state of "oh, I accidentally made a test that changes behavior when run a second time/with files left around" (we see this sometimes and need to explicitly rm things in the test - sometimes then cleaning up the test later once the bad files are no longer present/problematic)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85690



More information about the llvm-commits mailing list