[clang-objc-fuzzer] Add LLVMFuzzerInitialize to fix msvc builds (PR44414)

The (supposedly superfluous) LLVMFuzzerInitialize function was removed when this file was copied from clang-fuzzer, but this is causing link errors on some targets. @morehouse confirmed on D69171 that it was OK to add back.
This commit is contained in:
Simon Pilgrim 2020-04-14 13:37:10 +01:00
parent 80aea8e4a8
commit 440b445fff
1 changed files with 2 additions and 0 deletions

View File

@ -16,6 +16,8 @@
using namespace clang_fuzzer;
extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv) { return 0; }
extern "C" int LLVMFuzzerTestOneInput(uint8_t *data, size_t size) {
std::string s(reinterpret_cast<const char *>(data), size);
HandleCXX(s, "./test.m", {"-O2"});