diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2011-10-10 13:10:09 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2011-10-10 13:10:09 +0000 |
commit | d226ed71f24f2db200e3751e05b82c7700514116 (patch) | |
tree | 907363d56b8c3a3950f27d19160272f4ef326daa /tools | |
parent | 1a9908daebd5c416d71ff7fe9c8250074d817733 (diff) |
llvm-objdump: Take ownership of MCInstrInfos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141535 91177308-0d34-0410-b5e6-96231b3b80d8
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() |