[PATCH] D48913: [llvm-mc-assemble-fuzzer] Update API - Pass MCObjectWriter instead of a stream
Pratik Bhatu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 3 23:33:53 PDT 2018
pbhatu created this revision.
pbhatu added reviewers: davide, bcain.
Herald added a subscriber: llvm-commits.
Fixes build breakage of llvm-mc-assemble-fuzzer introduced by r332749.
Repository:
rL LLVM
https://reviews.llvm.org/D48913
Files:
tools/llvm-mc-assemble-fuzzer/llvm-mc-assemble-fuzzer.cpp
Index: tools/llvm-mc-assemble-fuzzer/llvm-mc-assemble-fuzzer.cpp
===================================================================
--- tools/llvm-mc-assemble-fuzzer/llvm-mc-assemble-fuzzer.cpp
+++ tools/llvm-mc-assemble-fuzzer/llvm-mc-assemble-fuzzer.cpp
@@ -18,6 +18,7 @@
#include "llvm/MC/MCInstPrinter.h"
#include "llvm/MC/MCInstrInfo.h"
#include "llvm/MC/MCObjectFileInfo.h"
+#include "llvm/MC/MCObjectWriter.h"
#include "llvm/MC/MCParser/AsmLexer.h"
#include "llvm/MC/MCParser/MCTargetAsmParser.h"
#include "llvm/MC/MCRegisterInfo.h"
@@ -230,9 +231,9 @@
MCCodeEmitter *CE = TheTarget->createMCCodeEmitter(*MCII, *MRI, Ctx);
MCAsmBackend *MAB = TheTarget->createMCAsmBackend(*STI, *MRI, MCOptions);
Str.reset(TheTarget->createMCObjectStreamer(
- TheTriple, Ctx, std::unique_ptr<MCAsmBackend>(MAB), *OS,
- std::unique_ptr<MCCodeEmitter>(CE), *STI, MCOptions.MCRelaxAll,
- MCOptions.MCIncrementalLinkerCompatible,
+ TheTriple, Ctx, std::unique_ptr<MCAsmBackend>(MAB),
+ MAB->createObjectWriter(*OS), std::unique_ptr<MCCodeEmitter>(CE), *STI,
+ MCOptions.MCRelaxAll, MCOptions.MCIncrementalLinkerCompatible,
/*DWARFMustBeAtTheEnd*/ false));
}
const int Res = AssembleInput(ProgName, TheTarget, SrcMgr, Ctx, *Str, *MAI, *STI,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48913.154052.patch
Type: text/x-patch
Size: 1306 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180704/9806909d/attachment.bin>
More information about the llvm-commits
mailing list