diff options
Diffstat (limited to 'llvm/lib/Fuzzer/FuzzerDefs.h')
-rw-r--r-- | llvm/lib/Fuzzer/FuzzerDefs.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerDefs.h b/llvm/lib/Fuzzer/FuzzerDefs.h index 3fc62da7ae9..b282a83ac98 100644 --- a/llvm/lib/Fuzzer/FuzzerDefs.h +++ b/llvm/lib/Fuzzer/FuzzerDefs.h @@ -60,11 +60,13 @@ int FuzzerDriver(int *argc, char ***argv, UserCallback Callback); bool IsFile(const std::string &Path); long GetEpoch(const std::string &Path); std::string FileToString(const std::string &Path); -Unit FileToVector(const std::string &Path, size_t MaxSize = 0); +Unit FileToVector(const std::string &Path, size_t MaxSize = 0, + bool ExitOnError = true); void ReadDirToVectorOfUnits(const char *Path, std::vector<Unit> *V, - long *Epoch, size_t MaxSize); + long *Epoch, size_t MaxSize, bool ExitOnError); void WriteToFile(const Unit &U, const std::string &Path); void CopyFileToErr(const std::string &Path); +void DeleteFile(const std::string &Path); // Returns "Dir/FileName" or equivalent for the current OS. std::string DirPlusFile(const std::string &DirPath, const std::string &FileName); |