summaryrefslogtreecommitdiff
path: root/lib/Target/BPF
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2017-10-11 01:57:21 +0000
committerLang Hames <lhames@gmail.com>2017-10-11 01:57:21 +0000
commit445025a87541e2d274d23eab8e3951d56969df11 (patch)
treecaf93e9d171bf33e2e0948208ea380f92d5127ba /lib/Target/BPF
parent061e7017039f963caff79bff51c0fb43a88bebdd (diff)
[MC] Have MCObjectStreamer take its MCAsmBackend argument via unique_ptr.
MCObjectStreamer owns its MCAsmBackend -- this fixes the types to reflect that, and allows us to remove another instance of MCObjectStreamer's weird "holding ownership via someone else's reference" trick. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315410 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/BPF')
-rw-r--r--lib/Target/BPF/MCTargetDesc/BPFMCTargetDesc.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Target/BPF/MCTargetDesc/BPFMCTargetDesc.cpp b/lib/Target/BPF/MCTargetDesc/BPFMCTargetDesc.cpp
index 797904e1c97..40459f57fee 100644
--- a/lib/Target/BPF/MCTargetDesc/BPFMCTargetDesc.cpp
+++ b/lib/Target/BPF/MCTargetDesc/BPFMCTargetDesc.cpp
@@ -49,11 +49,11 @@ static MCSubtargetInfo *createBPFMCSubtargetInfo(const Triple &TT,
return createBPFMCSubtargetInfoImpl(TT, CPU, FS);
}
-static MCStreamer *createBPFMCStreamer(const Triple &T,
- MCContext &Ctx, MCAsmBackend &MAB,
- raw_pwrite_stream &OS, MCCodeEmitter *Emitter,
- bool RelaxAll) {
- return createELFStreamer(Ctx, MAB, OS, Emitter, RelaxAll);
+static MCStreamer *createBPFMCStreamer(const Triple &T, MCContext &Ctx,
+ std::unique_ptr<MCAsmBackend> &&MAB,
+ raw_pwrite_stream &OS,
+ MCCodeEmitter *Emitter, bool RelaxAll) {
+ return createELFStreamer(Ctx, std::move(MAB), OS, Emitter, RelaxAll);
}
static MCInstPrinter *createBPFMCInstPrinter(const Triple &T,