Fangrui Song | 990061b | 2019-02-21 07:57:14 +0000 | [diff] [blame] | 1 | //===-- DummyISelFuzzer.cpp - Entry point to sanity check the fuzzer ------===// |
Justin Bogner | c3b67fb | 2017-09-01 17:02:22 +0000 | [diff] [blame] | 2 | // |
Chandler Carruth | 2946cd7 | 2019-01-19 08:50:56 +0000 | [diff] [blame] | 3 | // 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 |
Justin Bogner | c3b67fb | 2017-09-01 17:02:22 +0000 | [diff] [blame] | 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | // |
| 9 | // Implementation of main so we can build and test without linking libFuzzer. |
| 10 | // |
| 11 | //===----------------------------------------------------------------------===// |
| 12 | |
Justin Bogner | 7f28d73 | 2017-09-02 23:43:04 +0000 | [diff] [blame] | 13 | #include "llvm/FuzzMutate/FuzzerCLI.h" |
Justin Bogner | c3b67fb | 2017-09-01 17:02:22 +0000 | [diff] [blame] | 14 | |
| 15 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size); |
Justin Bogner | b79a4ef | 2017-09-01 19:37:49 +0000 | [diff] [blame] | 16 | extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv); |
Justin Bogner | c3b67fb | 2017-09-01 17:02:22 +0000 | [diff] [blame] | 17 | int main(int argc, char *argv[]) { |
Justin Bogner | 7f28d73 | 2017-09-02 23:43:04 +0000 | [diff] [blame] | 18 | return llvm::runFuzzerOnInputs(argc, argv, LLVMFuzzerTestOneInput, |
| 19 | LLVMFuzzerInitialize); |
Justin Bogner | c3b67fb | 2017-09-01 17:02:22 +0000 | [diff] [blame] | 20 | } |