diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/llvm-objdump/MachODump.cpp | 4 | ||||
-rw-r--r-- | tools/llvm-objdump/llvm-objdump.cpp | 6 |
2 files changed, 2 insertions, 8 deletions
diff --git a/tools/llvm-objdump/MachODump.cpp b/tools/llvm-objdump/MachODump.cpp index 955c01c230..3f44b295d3 100644 --- a/tools/llvm-objdump/MachODump.cpp +++ b/tools/llvm-objdump/MachODump.cpp @@ -284,9 +284,9 @@ void llvm::DisassembleInputMachO(StringRef Filename) { // GetTarget prints out stuff. return; } - const MCInstrInfo *InstrInfo = TheTarget->createMCInstrInfo(); + OwningPtr<const MCInstrInfo> InstrInfo(TheTarget->createMCInstrInfo()); OwningPtr<MCInstrAnalysis> - InstrAnalysis(TheTarget->createMCInstrAnalysis(InstrInfo)); + InstrAnalysis(TheTarget->createMCInstrAnalysis(InstrInfo.get())); // Set up disassembler. OwningPtr<const MCAsmInfo> AsmInfo(TheTarget->createMCAsmInfo(TripleName)); diff --git a/tools/llvm-objdump/llvm-objdump.cpp b/tools/llvm-objdump/llvm-objdump.cpp index e9231d0a06..a8df3e57f9 100644 --- a/tools/llvm-objdump/llvm-objdump.cpp +++ b/tools/llvm-objdump/llvm-objdump.cpp @@ -24,9 +24,6 @@ #include "llvm/MC/MCDisassembler.h" #include "llvm/MC/MCInst.h" #include "llvm/MC/MCInstPrinter.h" -#include "llvm/MC/MCInstrAnalysis.h" -#include "llvm/MC/MCInstrDesc.h" -#include "llvm/MC/MCInstrInfo.h" #include "llvm/MC/MCSubtargetInfo.h" #include "llvm/Support/Casting.h" #include "llvm/Support/CommandLine.h" @@ -143,9 +140,6 @@ static void DisassembleObject(const ObjectFile *Obj) { // GetTarget prints out stuff. return; } - const MCInstrInfo *InstrInfo = TheTarget->createMCInstrInfo(); - OwningPtr<MCInstrAnalysis> - InstrAnalysis(TheTarget->createMCInstrAnalysis(InstrInfo)); outs() << '\n'; outs() << Obj->getFileName() |