mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:02:41 +01:00
[libFuzzer] remove the C++-ish variant of FuzzerDriver from the interface
llvm-svn: 260801
This commit is contained in:
parent
abf7df0972
commit
ef83d4c558
@ -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::string> &Args, UserCallback Callback) {
|
||||
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
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user