Skip to content

Commit 440b445

Browse files
committed
[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.
1 parent 80aea8e commit 440b445

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

clang/tools/clang-fuzzer/ClangObjectiveCFuzzer.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
using namespace clang_fuzzer;
1818

19+
extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv) { return 0; }
20+
1921
extern "C" int LLVMFuzzerTestOneInput(uint8_t *data, size_t size) {
2022
std::string s(reinterpret_cast<const char *>(data), size);
2123
HandleCXX(s, "./test.m", {"-O2"});

0 commit comments

Comments
 (0)