summaryrefslogtreecommitdiff
path: root/tools/llvm-mc-disassemble-fuzzer
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2017-08-29 17:08:44 +0000
committerJustin Bogner <mail@justinbogner.com>2017-08-29 17:08:44 +0000
commitae0931ef31f33728ed62628e904d1c1f3e80d4d4 (patch)
tree4d02c29e4499722ddd6750dcc03b3dd0427cb475 /tools/llvm-mc-disassemble-fuzzer
parent7ca5fcca7f11b917b1af2c1ea7462a81436eae6e (diff)
Fix build of llvm-mc-assemble/disassemble-fuzzer
Since these aren't built by default unless building with coverage (and even then they aren't built for the check target) they've managed to bit rot a little. This just fixes the build. See llvm.org/pr34314 for the plan on making sure these don't bit rot again. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312011 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-mc-disassemble-fuzzer')
-rw-r--r--tools/llvm-mc-disassemble-fuzzer/llvm-mc-disassemble-fuzzer.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/llvm-mc-disassemble-fuzzer/llvm-mc-disassemble-fuzzer.cpp b/tools/llvm-mc-disassemble-fuzzer/llvm-mc-disassemble-fuzzer.cpp
index 482fc77db59..36d1f7ca994 100644
--- a/tools/llvm-mc-disassemble-fuzzer/llvm-mc-disassemble-fuzzer.cpp
+++ b/tools/llvm-mc-disassemble-fuzzer/llvm-mc-disassemble-fuzzer.cpp
@@ -73,11 +73,12 @@ int DisassembleOneInput(const uint8_t *Data, size_t Size) {
return 0;
}
-int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
+extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
return DisassembleOneInput(Data, Size);
}
-int LLVMFuzzerInitialize(int *argc, char ***argv) {
+extern "C" LLVM_ATTRIBUTE_USED int LLVMFuzzerInitialize(int *argc,
+ char ***argv) {
// The command line is unusual compared to other fuzzers due to the need to
// specify the target. Options like -triple, -mcpu, and -mattr work like
// their counterparts in llvm-mc, while -fuzzer-args collects options for the