diff options
Diffstat (limited to 'llvm/lib/Fuzzer/FuzzerIO.cpp')
-rw-r--r-- | llvm/lib/Fuzzer/FuzzerIO.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerIO.cpp b/llvm/lib/Fuzzer/FuzzerIO.cpp index 172540c..4e0ac81 100644 --- a/llvm/lib/Fuzzer/FuzzerIO.cpp +++ b/llvm/lib/Fuzzer/FuzzerIO.cpp @@ -13,7 +13,7 @@ #include <dirent.h> namespace fuzzer { -std::vector<std::string> ListFilesInDir(const std::string &Dir) { +static std::vector<std::string> ListFilesInDir(const std::string &Dir) { std::vector<std::string> V; DIR *D = opendir(Dir.c_str()); if (!D) return V; @@ -38,7 +38,12 @@ void WriteToFile(const Unit &U, const std::string &Path) { void ReadDirToVectorOfUnits(const char *Path, std::vector<Unit> *V) { for (auto &X : ListFilesInDir(Path)) - V->push_back(FileToVector(std::string(Path) + "/" + X)); + V->push_back(FileToVector(DirPlusFile(Path, X))); +} + +std::string DirPlusFile(const std::string &DirPath, + const std::string &FileName) { + return DirPath + "/" + FileName; } } // namespace fuzzer |