summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-isel-fuzzer/DummyISelFuzzer.cpp
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2017-09-01 19:37:49 +0000
committerJustin Bogner <mail@justinbogner.com>2017-09-01 19:37:49 +0000
commitb79a4efc50931e5ee5f8984cc016766575e96821 (patch)
tree5c2e06a8f1e48849cd372ed6120500e1c70a069b /llvm/tools/llvm-isel-fuzzer/DummyISelFuzzer.cpp
parent058cfeba21922c9f57534efe81a0add73314cb61 (diff)
downloadbcm5719-llvm-b79a4efc50931e5ee5f8984cc016766575e96821.tar.gz
bcm5719-llvm-b79a4efc50931e5ee5f8984cc016766575e96821.zip
llvm-isel-fuzzer: Weak function invoke the ire of PE/COFF
It's non-trivial to use weak symbols in a cross platform way (See sanitizer_win_defs.h in compiler-rt), and doing it naively like we have here causes some build failures: http://lab.llvm.org:8011/builders/clang-with-thin-lto-windows/builds/1260 Instead of going down the rabbit hole of emulating weak symbols for this very trivial dummy fuzzer driver, we can just rely on the fact that we know which hooks any given fuzz target implements and forward declare a normal symbol. llvm-svn: 312354
Diffstat (limited to 'llvm/tools/llvm-isel-fuzzer/DummyISelFuzzer.cpp')
-rw-r--r--llvm/tools/llvm-isel-fuzzer/DummyISelFuzzer.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/llvm/tools/llvm-isel-fuzzer/DummyISelFuzzer.cpp b/llvm/tools/llvm-isel-fuzzer/DummyISelFuzzer.cpp
index 929a63a541d..89c1c81cdbe 100644
--- a/llvm/tools/llvm-isel-fuzzer/DummyISelFuzzer.cpp
+++ b/llvm/tools/llvm-isel-fuzzer/DummyISelFuzzer.cpp
@@ -20,10 +20,7 @@
using namespace llvm;
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size);
-extern "C" LLVM_ATTRIBUTE_WEAK int LLVMFuzzerInitialize(int *argc,
- char ***argv) {
- return 0;
-}
+extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv);
int main(int argc, char *argv[]) {
errs() << "*** This tool was not linked to libFuzzer.\n"
OpenPOWER on IntegriCloud