blob: bf8875abb447f4253b881f6b68c0a0f4c92e068f [file] [log] [blame]
george.karpenkov29efa6d2017-08-21 23:25:50 +00001//===- FuzzerMain.cpp - main() function and flags -------------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9// main() and flags.
10//===----------------------------------------------------------------------===//
11
12#include "FuzzerDefs.h"
13
14extern "C" {
15// This function should be defined by the user.
16int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size);
17} // extern "C"
18
phosekc868c9f2018-01-17 00:42:48 +000019__attribute__ ((visibility("default"))) int main(int argc, char **argv) {
george.karpenkov29efa6d2017-08-21 23:25:50 +000020 return fuzzer::FuzzerDriver(&argc, &argv, LLVMFuzzerTestOneInput);
21}