summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/fuzzer/FuzzerIO.cpp
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2019-02-13 04:04:45 +0000
committerKostya Serebryany <kcc@google.com>2019-02-13 04:04:45 +0000
commitd085748484193f3b4f9c73fa339b4390f7092f41 (patch)
tree698ad78e84b6b0a799d8c8cf2ad8c4f072372373 /compiler-rt/lib/fuzzer/FuzzerIO.cpp
parent55fb5314b39efe168538727df68b104913641d5d (diff)
downloadbcm5719-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.cpp10
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) {
OpenPOWER on IntegriCloud