summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp
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
commit02d330548d07cfbbb7cd496c94a514802527dfeb (patch)
tree60e57bf4af3cfd30f61c5f4b4349aa2f0aef197f /llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp
parent6b394caaf1c84ecd73469eacebba9453f9772552 (diff)
downloadbcm5719-llvm-02d330548d07cfbbb7cd496c94a514802527dfeb.tar.gz
bcm5719-llvm-02d330548d07cfbbb7cd496c94a514802527dfeb.zip
[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. llvm-svn: 315410
Diffstat (limited to 'llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp')
-rw-r--r--llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp b/llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp
index dba36e40d34..41a96ac845a 100644
--- a/llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp
+++ b/llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp
@@ -181,8 +181,8 @@ llvm::Error dwarfgen::Generator::init(Triple TheTriple, uint16_t V) {
MCTargetOptions MCOptions = InitMCTargetOptionsFromFlags();
MS = TheTarget->createMCObjectStreamer(
- TheTriple, *MC, *MAB, *Stream, MCE, *MSTI, MCOptions.MCRelaxAll,
- MCOptions.MCIncrementalLinkerCompatible,
+ TheTriple, *MC, std::unique_ptr<MCAsmBackend>(MAB), *Stream, MCE, *MSTI,
+ MCOptions.MCRelaxAll, MCOptions.MCIncrementalLinkerCompatible,
/*DWARFMustBeAtTheEnd*/ false);
if (!MS)
return make_error<StringError>("no object streamer for target " +
OpenPOWER on IntegriCloud