[llvm] r260801 - [libFuzzer] remove the C++-ish variant of FuzzerDriver from the interface
Kostya Serebryany via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 12 19:59:27 PST 2016
Author: kcc
Date: Fri Feb 12 21:59:26 2016
New Revision: 260801
URL: http://llvm.org/viewvc/llvm-project?rev=260801&view=rev
Log:
[libFuzzer] remove the C++-ish variant of FuzzerDriver from the interface
Modified:
llvm/trunk/lib/Fuzzer/FuzzerDriver.cpp
llvm/trunk/lib/Fuzzer/FuzzerInterface.h
Modified: llvm/trunk/lib/Fuzzer/FuzzerDriver.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/FuzzerDriver.cpp?rev=260801&r1=260800&r2=260801&view=diff
==============================================================================
--- llvm/trunk/lib/Fuzzer/FuzzerDriver.cpp (original)
+++ llvm/trunk/lib/Fuzzer/FuzzerDriver.cpp Fri Feb 12 21:59:26 2016
@@ -241,12 +241,8 @@ static bool AllInputsAreFiles() {
return true;
}
-int FuzzerDriver(int argc, char **argv, UserCallback Callback) {
- std::vector<std::string> Args(argv, argv + argc);
- return FuzzerDriver(Args, Callback);
-}
-
-int FuzzerDriver(const std::vector<std::string> &Args, UserCallback Callback) {
+static int FuzzerDriver(const std::vector<std::string> &Args,
+ UserCallback Callback) {
using namespace fuzzer;
assert(!Args.empty());
ProgName = new std::string(Args[0]);
@@ -377,4 +373,9 @@ int FuzzerDriver(const std::vector<std::
exit(0); // Don't let F destroy itself.
}
+int FuzzerDriver(int argc, char **argv, UserCallback Callback) {
+ std::vector<std::string> Args(argv, argv + argc);
+ return FuzzerDriver(Args, Callback);
+}
+
} // namespace fuzzer
Modified: llvm/trunk/lib/Fuzzer/FuzzerInterface.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/FuzzerInterface.h?rev=260801&r1=260800&r2=260801&view=diff
==============================================================================
--- llvm/trunk/lib/Fuzzer/FuzzerInterface.h (original)
+++ llvm/trunk/lib/Fuzzer/FuzzerInterface.h Fri Feb 12 21:59:26 2016
@@ -16,11 +16,8 @@
#ifndef LLVM_FUZZER_INTERFACE_H
#define LLVM_FUZZER_INTERFACE_H
-#include <limits>
#include <cstddef>
#include <cstdint>
-#include <vector>
-#include <string>
// Plain C interface. Should be sufficient for most uses.
extern "C" {
@@ -73,9 +70,6 @@ int main(int argc, char **argv) {
*/
int FuzzerDriver(int argc, char **argv, UserCallback Callback);
-/// More C++-ish interface.
-int FuzzerDriver(const std::vector<std::string> &Args, UserCallback Callback);
-
// Same interface as LLVMFuzzerTestOneInput.
// Can be used inside the user-supplied LLVMFuzzerTestOneInput.
size_t Mutate(uint8_t *Data, size_t Size, size_t MaxSize, unsigned int Seed);
More information about the llvm-commits
mailing list