llvm.org GIT mirror llvm / ae0931e
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 Justin Bogner 2 years ago
2 changed file(s) with 7 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
170170 MCContext Ctx(MAI.get(), MRI.get(), &MOFI, &SrcMgr);
171171
172172 static const bool UsePIC = false;
173 static const CodeModel::Model CMModel = CodeModel::Default;
174 MOFI.InitMCObjectFileInfo(TheTriple, UsePIC, CMModel, Ctx);
173 MOFI.InitMCObjectFileInfo(TheTriple, UsePIC, Ctx);
175174
176175 const unsigned OutputAsmVariant = 0;
177176 std::unique_ptr MCII(TheTarget->createMCInstrInfo());
242241 return 0;
243242 }
244243
245 int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
244 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
246245 return AssembleOneInput(Data, Size);
247246 }
248247
249 int LLVMFuzzerInitialize(int *argc, char ***argv) {
248 extern "C" LLVM_ATTRIBUTE_USED int LLVMFuzzerInitialize(int *argc,
249 char ***argv) {
250250 // The command line is unusual compared to other fuzzers due to the need to
251251 // specify the target. Options like -triple, -mcpu, and -mattr work like
252252 // their counterparts in llvm-mc, while -fuzzer-args collects options for the
7272 return 0;
7373 }
7474
75 int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
75 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
7676 return DisassembleOneInput(Data, Size);
7777 }
7878
79 int LLVMFuzzerInitialize(int *argc, char ***argv) {
79 extern "C" LLVM_ATTRIBUTE_USED int LLVMFuzzerInitialize(int *argc,
80 char ***argv) {
8081 // The command line is unusual compared to other fuzzers due to the need to
8182 // specify the target. Options like -triple, -mcpu, and -mattr work like
8283 // their counterparts in llvm-mc, while -fuzzer-args collects options for the