[PATCH] D39268: Make MCAsmBackend and MCCodeEmiiter passed by unique_ptr rval
Mitch Phillips via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 6 10:57:13 PST 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL317498: Make MCAsmBackend and MCCodeEmiiter passed by unique_ptr rval (authored by hctim).
Changed prior to commit:
https://reviews.llvm.org/D39268?vs=121756&id=121757#toc
Repository:
rL LLVM
https://reviews.llvm.org/D39268
Files:
llvm/trunk/tools/llvm-mc-assemble-fuzzer/llvm-mc-assemble-fuzzer.cpp
Index: llvm/trunk/tools/llvm-mc-assemble-fuzzer/llvm-mc-assemble-fuzzer.cpp
===================================================================
--- llvm/trunk/tools/llvm-mc-assemble-fuzzer/llvm-mc-assemble-fuzzer.cpp
+++ llvm/trunk/tools/llvm-mc-assemble-fuzzer/llvm-mc-assemble-fuzzer.cpp
@@ -13,6 +13,7 @@
#include "llvm/MC/SubtargetFeature.h"
#include "llvm/MC/MCAsmBackend.h"
#include "llvm/MC/MCAsmInfo.h"
+#include "llvm/MC/MCCodeEmitter.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCInstPrinter.h"
#include "llvm/MC/MCInstrInfo.h"
@@ -84,7 +85,7 @@
{
public:
LLVMFuzzerInputBuffer(const uint8_t *data_, size_t size_)
- : Data(reinterpret_cast<const char *>(data_)),
+ : Data(reinterpret_cast<const char *>(data_)),
Size(size_) {
init(Data, Data+Size, false);
}
@@ -230,7 +231,8 @@
MCAsmBackend *MAB = TheTarget->createMCAsmBackend(*MRI, TripleName, MCPU,
MCOptions);
Str.reset(TheTarget->createMCObjectStreamer(
- TheTriple, Ctx, *MAB, *OS, CE, *STI, MCOptions.MCRelaxAll,
+ TheTriple, Ctx, std::unique_ptr<MCAsmBackend>(MAB), *OS,
+ std::unique_ptr<MCCodeEmitter>(CE), *STI, MCOptions.MCRelaxAll,
MCOptions.MCIncrementalLinkerCompatible,
/*DWARFMustBeAtTheEnd*/ false));
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39268.121757.patch
Type: text/x-patch
Size: 1347 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171106/7862fa3d/attachment.bin>
More information about the llvm-commits
mailing list