diff --git a/tools/llvm-objdump/MachODump.cpp b/tools/llvm-objdump/MachODump.cpp index 955c01c230f..3f44b295d32 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 InstrInfo(TheTarget->createMCInstrInfo()); OwningPtr - InstrAnalysis(TheTarget->createMCInstrAnalysis(InstrInfo)); + InstrAnalysis(TheTarget->createMCInstrAnalysis(InstrInfo.get())); // Set up disassembler. OwningPtr AsmInfo(TheTarget->createMCAsmInfo(TripleName)); diff --git a/tools/llvm-objdump/llvm-objdump.cpp b/tools/llvm-objdump/llvm-objdump.cpp index e9231d0a066..a8df3e57f98 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 - InstrAnalysis(TheTarget->createMCInstrAnalysis(InstrInfo)); outs() << '\n'; outs() << Obj->getFileName()