[PATCH] Add a Fuzzer library

David Majnemer david.majnemer at gmail.com
Tue Jan 27 10:06:44 PST 2015


================
Comment at: lib/Fuzzer/FuzzerIO.cpp:18
@@ +17,3 @@
+  std::vector<std::string> V;
+  DIR *D = opendir(Dir.c_str());
+  if (!D) return V;
----------------
Could you instead use `fs::directory_iterator` so that this works on Windows too?

================
Comment at: lib/Fuzzer/FuzzerIO.cpp:41
@@ +40,3 @@
+  for (auto &X : ListFilesInDir(Path))
+    V->push_back(FileToVector(std::string(Path) + "/" + X));
+}
----------------
Perhaps use `sys::path::get_separator()` instead of hardcoding '/'

http://reviews.llvm.org/D7184

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list