blob: 771a34aed3167e54b6363f2a5d10c2c94b942505 [file] [log] [blame]
george.karpenkov29efa6d2017-08-21 23:25:50 +00001//===- FuzzerMain.cpp - main() function and flags -------------------------===//
2//
chandlerc40284492019-01-19 08:50:56 +00003// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
george.karpenkov29efa6d2017-08-21 23:25:50 +00006//
7//===----------------------------------------------------------------------===//
8// main() and flags.
9//===----------------------------------------------------------------------===//
10
11#include "FuzzerDefs.h"
12
13extern "C" {
14// This function should be defined by the user.
15int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size);
16} // extern "C"
17
metzman2fe66e62019-01-17 16:36:05 +000018ATTRIBUTE_INTERFACE int main(int argc, char **argv) {
george.karpenkov29efa6d2017-08-21 23:25:50 +000019 return fuzzer::FuzzerDriver(&argc, &argv, LLVMFuzzerTestOneInput);
20}