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 | 806f68bbab5118c0252fdeaf1d84fc17ba9dae5c (patch) | |
tree | 0b21d2104360bf513e4c2b374c4c321cd8be6ffa /tools/llvm-dwp | |
parent | dc62a47c34a9bc82054e4e221c10c4592c89eea3 (diff) |
[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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315531 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-dwp')
-rw-r--r-- | tools/llvm-dwp/llvm-dwp.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/llvm-dwp/llvm-dwp.cpp b/tools/llvm-dwp/llvm-dwp.cpp index fd6559f281b..59975f323bf 100644 --- a/tools/llvm-dwp/llvm-dwp.cpp +++ b/tools/llvm-dwp/llvm-dwp.cpp @@ -22,6 +22,7 @@ #include "llvm/DebugInfo/DWARF/DWARFUnitIndex.h" #include "llvm/MC/MCAsmBackend.h" #include "llvm/MC/MCAsmInfo.h" +#include "llvm/MC/MCCodeEmitter.h" #include "llvm/MC/MCContext.h" #include "llvm/MC/MCInstrInfo.h" #include "llvm/MC/MCObjectFileInfo.h" @@ -707,8 +708,9 @@ int main(int argc, char **argv) { MCTargetOptions MCOptions = InitMCTargetOptionsFromFlags(); std::unique_ptr<MCStreamer> MS(TheTarget->createMCObjectStreamer( - TheTriple, MC, std::unique_ptr<MCAsmBackend>(MAB), OutFile, MCE, *MSTI, - MCOptions.MCRelaxAll, MCOptions.MCIncrementalLinkerCompatible, + TheTriple, MC, std::unique_ptr<MCAsmBackend>(MAB), OutFile, + std::unique_ptr<MCCodeEmitter>(MCE), *MSTI, MCOptions.MCRelaxAll, + MCOptions.MCIncrementalLinkerCompatible, /*DWARFMustBeAtTheEnd*/ false)); if (!MS) return error("no object streamer for target " + TripleName, Context); |