diff options
| -rw-r--r-- | llvm/lib/Fuzzer/FuzzerCorpus.h | 2 | ||||
| -rw-r--r-- | llvm/lib/Fuzzer/FuzzerIO.h | 2 | ||||
| -rw-r--r-- | llvm/lib/Fuzzer/FuzzerIOPosix.cpp | 2 | ||||
| -rw-r--r-- | llvm/lib/Fuzzer/FuzzerIOWindows.cpp | 2 | ||||
| -rw-r--r-- | llvm/lib/Fuzzer/FuzzerMerge.cpp | 4 |
5 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerCorpus.h b/llvm/lib/Fuzzer/FuzzerCorpus.h index 88e83b320c4..663c5854b4c 100644 --- a/llvm/lib/Fuzzer/FuzzerCorpus.h +++ b/llvm/lib/Fuzzer/FuzzerCorpus.h @@ -119,7 +119,7 @@ class InputCorpus { void DeleteInput(size_t Idx) { InputInfo &II = *Inputs[Idx]; if (!OutputCorpus.empty() && II.MayDeleteFile) - DeleteFile(DirPlusFile(OutputCorpus, Sha1ToString(II.Sha1))); + RemoveFile(DirPlusFile(OutputCorpus, Sha1ToString(II.Sha1))); Unit().swap(II.U); if (FeatureDebug) Printf("EVICTED %zd\n", Idx); diff --git a/llvm/lib/Fuzzer/FuzzerIO.h b/llvm/lib/Fuzzer/FuzzerIO.h index f5651cfe9ed..741fecf415b 100644 --- a/llvm/lib/Fuzzer/FuzzerIO.h +++ b/llvm/lib/Fuzzer/FuzzerIO.h @@ -57,7 +57,7 @@ int CloseFile(int Fd); int DuplicateFile(int Fd); -void DeleteFile(const std::string &Path); +void RemoveFile(const std::string &Path); } // namespace fuzzer diff --git a/llvm/lib/Fuzzer/FuzzerIOPosix.cpp b/llvm/lib/Fuzzer/FuzzerIOPosix.cpp index 53a58f96287..720bc130459 100644 --- a/llvm/lib/Fuzzer/FuzzerIOPosix.cpp +++ b/llvm/lib/Fuzzer/FuzzerIOPosix.cpp @@ -71,7 +71,7 @@ int DuplicateFile(int Fd) { return dup(Fd); } -void DeleteFile(const std::string &Path) { +void RemoveFile(const std::string &Path) { unlink(Path.c_str()); } diff --git a/llvm/lib/Fuzzer/FuzzerIOWindows.cpp b/llvm/lib/Fuzzer/FuzzerIOWindows.cpp index dd36d0632bb..a4738eb9dfe 100644 --- a/llvm/lib/Fuzzer/FuzzerIOWindows.cpp +++ b/llvm/lib/Fuzzer/FuzzerIOWindows.cpp @@ -135,7 +135,7 @@ int DuplicateFile(int Fd) { return _dup(Fd); } -void DeleteFile(const std::string &Path) { +void RemoveFile(const std::string &Path) { _unlink(Path.c_str()); } diff --git a/llvm/lib/Fuzzer/FuzzerMerge.cpp b/llvm/lib/Fuzzer/FuzzerMerge.cpp index 21f15998330..72f171e7e41 100644 --- a/llvm/lib/Fuzzer/FuzzerMerge.cpp +++ b/llvm/lib/Fuzzer/FuzzerMerge.cpp @@ -221,7 +221,7 @@ void Fuzzer::CrashResistantMerge(const std::vector<std::string> &Args, std::string CFPath = "libFuzzerTemp." + std::to_string(GetPid()) + ".txt"; // Write the control file. - DeleteFile(CFPath); + RemoveFile(CFPath); std::ofstream ControlFile(CFPath); ControlFile << AllFiles.size() << "\n"; ControlFile << NumFilesInFirstCorpus << "\n"; @@ -253,7 +253,7 @@ void Fuzzer::CrashResistantMerge(const std::vector<std::string> &Args, for (auto &F: NewFiles) WriteToOutputCorpus(FileToVector(F)); // We are done, delete the control file. - DeleteFile(CFPath); + RemoveFile(CFPath); } } // namespace fuzzer |

