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

Simon Pilgrim via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 14 05:40:09 PDT 2020


Author: Simon Pilgrim
Date: 2020-04-14T13:37:27+01:00
New Revision: 440b445fff848aded09fe5f7d69ff690113e44e2

URL: https://github.com/llvm/llvm-project/commit/440b445fff848aded09fe5f7d69ff690113e44e2
DIFF: https://github.com/llvm/llvm-project/commit/440b445fff848aded09fe5f7d69ff690113e44e2.diff

LOG: [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.

Added: 
    

Modified: 
    clang/tools/clang-fuzzer/ClangObjectiveCFuzzer.cpp

Removed: 
    


################################################################################
diff  --git a/clang/tools/clang-fuzzer/ClangObjectiveCFuzzer.cpp b/clang/tools/clang-fuzzer/ClangObjectiveCFuzzer.cpp
index 908778f3d765..40fb07d3332f 100644
--- a/clang/tools/clang-fuzzer/ClangObjectiveCFuzzer.cpp
+++ b/clang/tools/clang-fuzzer/ClangObjectiveCFuzzer.cpp
@@ -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"});


        


More information about the cfe-commits mailing list