diff options
author | Kostya Serebryany <kcc@google.com> | 2019-02-13 04:04:45 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2019-02-13 04:04:45 +0000 |
commit | d085748484193f3b4f9c73fa339b4390f7092f41 (patch) | |
tree | 698ad78e84b6b0a799d8c8cf2ad8c4f072372373 /compiler-rt/lib/fuzzer/FuzzerIO.cpp | |
parent | 55fb5314b39efe168538727df68b104913641d5d (diff) | |
download | bcm5719-llvm-d085748484193f3b4f9c73fa339b4390f7092f41.tar.gz bcm5719-llvm-d085748484193f3b4f9c73fa339b4390f7092f41.zip |
[libFuzzer] a bit of refactoring of the fork mode
llvm-svn: 353910
Diffstat (limited to 'compiler-rt/lib/fuzzer/FuzzerIO.cpp')
-rw-r--r-- | compiler-rt/lib/fuzzer/FuzzerIO.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler-rt/lib/fuzzer/FuzzerIO.cpp b/compiler-rt/lib/fuzzer/FuzzerIO.cpp index 91e1d20804a..33d6568c9c0 100644 --- a/compiler-rt/lib/fuzzer/FuzzerIO.cpp +++ b/compiler-rt/lib/fuzzer/FuzzerIO.cpp @@ -135,11 +135,11 @@ void VPrintf(bool Verbose, const char *Fmt, ...) { fflush(OutputFile); } -void RmFilesInDir(const std::string &Path) { - Vector<std::string> Files; - ListFilesInDirRecursive(Path, 0, &Files, /*TopDir*/true); - for (auto &F : Files) - RemoveFile(F); +void RmDirRecursive(const std::string &Dir) { + IterateDirRecurisve( + Dir, [](const std::string &Path) {}, + [](const std::string &Path) { RmDir(Path); }, + [](const std::string &Path) { RemoveFile(Path); }); } std::string TempPath(const char *Extension) { |