diff options
author | Justin Bogner <mail@justinbogner.com> | 2017-08-29 17:08:44 +0000 |
---|---|---|
committer | Justin Bogner <mail@justinbogner.com> | 2017-08-29 17:08:44 +0000 |
commit | 29c5d02f4f7c1a77e435efaca2ec8370accd7fb1 (patch) | |
tree | 7ec9537427a29cfa7f8c23200a53e18a895f30bb /llvm/tools/llvm-mc-assemble-fuzzer/llvm-mc-assemble-fuzzer.cpp | |
parent | 38eab876714e3b7e1e3969e629ff173024043ecd (diff) | |
download | bcm5719-llvm-29c5d02f4f7c1a77e435efaca2ec8370accd7fb1.tar.gz bcm5719-llvm-29c5d02f4f7c1a77e435efaca2ec8370accd7fb1.zip |
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.
llvm-svn: 312011
Diffstat (limited to 'llvm/tools/llvm-mc-assemble-fuzzer/llvm-mc-assemble-fuzzer.cpp')
-rw-r--r-- | llvm/tools/llvm-mc-assemble-fuzzer/llvm-mc-assemble-fuzzer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/tools/llvm-mc-assemble-fuzzer/llvm-mc-assemble-fuzzer.cpp b/llvm/tools/llvm-mc-assemble-fuzzer/llvm-mc-assemble-fuzzer.cpp index 015f1edd93f..63264a78c03 100644 --- a/llvm/tools/llvm-mc-assemble-fuzzer/llvm-mc-assemble-fuzzer.cpp +++ b/llvm/tools/llvm-mc-assemble-fuzzer/llvm-mc-assemble-fuzzer.cpp @@ -171,8 +171,7 @@ int AssembleOneInput(const uint8_t *Data, size_t Size) { MCContext Ctx(MAI.get(), MRI.get(), &MOFI, &SrcMgr); static const bool UsePIC = false; - static const CodeModel::Model CMModel = CodeModel::Default; - MOFI.InitMCObjectFileInfo(TheTriple, UsePIC, CMModel, Ctx); + MOFI.InitMCObjectFileInfo(TheTriple, UsePIC, Ctx); const unsigned OutputAsmVariant = 0; std::unique_ptr<MCInstrInfo> MCII(TheTarget->createMCInstrInfo()); @@ -243,11 +242,12 @@ int AssembleOneInput(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 AssembleOneInput(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 |