diff options
| author | Lang Hames <lhames@gmail.com> | 2017-10-11 23:34:47 +0000 |
|---|---|---|
| committer | Lang Hames <lhames@gmail.com> | 2017-10-11 23:34:47 +0000 |
| commit | 2241ffa43cee14361757e9dbdee01161030d1656 (patch) | |
| tree | 5c45b1e1a054f4ed236085ece5cc97200b5dc230 /llvm/lib/MC/MCWasmStreamer.cpp | |
| parent | 337462b36512cc001891a98fb98fa5693651722f (diff) | |
| download | bcm5719-llvm-2241ffa43cee14361757e9dbdee01161030d1656.tar.gz bcm5719-llvm-2241ffa43cee14361757e9dbdee01161030d1656.zip | |
[MC] Have MCObjectStreamer take its MCAsmBackend argument via unique_ptr.
MCObjectStreamer owns its MCCodeEmitter -- this fixes the types to reflect that,
and allows us to remove the last instance of MCObjectStreamer's weird "holding
ownership via someone else's reference" trick.
llvm-svn: 315531
Diffstat (limited to 'llvm/lib/MC/MCWasmStreamer.cpp')
| -rw-r--r-- | llvm/lib/MC/MCWasmStreamer.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/MC/MCWasmStreamer.cpp b/llvm/lib/MC/MCWasmStreamer.cpp index fdf1be67e4e..1262e891f5e 100644 --- a/llvm/lib/MC/MCWasmStreamer.cpp +++ b/llvm/lib/MC/MCWasmStreamer.cpp @@ -202,9 +202,11 @@ void MCWasmStreamer::FinishImpl() { MCStreamer *llvm::createWasmStreamer(MCContext &Context, std::unique_ptr<MCAsmBackend> &&MAB, - raw_pwrite_stream &OS, MCCodeEmitter *CE, + raw_pwrite_stream &OS, + std::unique_ptr<MCCodeEmitter> &&CE, bool RelaxAll) { - MCWasmStreamer *S = new MCWasmStreamer(Context, std::move(MAB), OS, CE); + MCWasmStreamer *S = + new MCWasmStreamer(Context, std::move(MAB), OS, std::move(CE)); if (RelaxAll) S->getAssembler().setRelaxAll(true); return S; |

