llvm.org GIT mirror llvm / 6e02997
Make MCAsmBackend and MCCodeEmiiter passed by unique_ptr rval Summary: Fixes build breakage of llvm-mc-assemble-fuzzer introduced by rL315531. Reviewers: lhames Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D39268 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317498 91177308-0d34-0410-b5e6-96231b3b80d8 Mitch Phillips 1 year, 11 months ago
1 changed file(s) with 4 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
1212 #include "llvm/MC/SubtargetFeature.h"
1313 #include "llvm/MC/MCAsmBackend.h"
1414 #include "llvm/MC/MCAsmInfo.h"
15 #include "llvm/MC/MCCodeEmitter.h"
1516 #include "llvm/MC/MCContext.h"
1617 #include "llvm/MC/MCInstPrinter.h"
1718 #include "llvm/MC/MCInstrInfo.h"
8384 {
8485 public:
8586 LLVMFuzzerInputBuffer(const uint8_t *data_, size_t size_)
86 : Data(reinterpret_cast(data_)),
87 : Data(reinterpret_cast(data_)),
8788 Size(size_) {
8889 init(Data, Data+Size, false);
8990 }
229230 MCAsmBackend *MAB = TheTarget->createMCAsmBackend(*MRI, TripleName, MCPU,
230231 MCOptions);
231232 Str.reset(TheTarget->createMCObjectStreamer(
232 TheTriple, Ctx, *MAB, *OS, CE, *STI, MCOptions.MCRelaxAll,
233 TheTriple, Ctx, std::unique_ptr(MAB), *OS,
234 std::unique_ptr(CE), *STI, MCOptions.MCRelaxAll,
233235 MCOptions.MCIncrementalLinkerCompatible,
234236 /*DWARFMustBeAtTheEnd*/ false));
235237 }