[llvm-commits] [llvm] r141535 - in /llvm/trunk/tools/llvm-objdump: MachODump.cpp llvm-objdump.cpp
Benjamin Kramer
benny.kra at googlemail.com
Mon Oct 10 06:10:09 PDT 2011
Author: d0k
Date: Mon Oct 10 08:10:09 2011
New Revision: 141535
URL: http://llvm.org/viewvc/llvm-project?rev=141535&view=rev
Log:
llvm-objdump: Take ownership of MCInstrInfos.
Modified:
llvm/trunk/tools/llvm-objdump/MachODump.cpp
llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp
Modified: llvm/trunk/tools/llvm-objdump/MachODump.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-objdump/MachODump.cpp?rev=141535&r1=141534&r2=141535&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-objdump/MachODump.cpp (original)
+++ llvm/trunk/tools/llvm-objdump/MachODump.cpp Mon Oct 10 08:10:09 2011
@@ -284,9 +284,9 @@
// 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));
Modified: llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp?rev=141535&r1=141534&r2=141535&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp (original)
+++ llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp Mon Oct 10 08:10:09 2011
@@ -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 @@
// GetTarget prints out stuff.
return;
}
- const MCInstrInfo *InstrInfo = TheTarget->createMCInstrInfo();
- OwningPtr<MCInstrAnalysis>
- InstrAnalysis(TheTarget->createMCInstrAnalysis(InstrInfo));
outs() << '\n';
outs() << Obj->getFileName()
More information about the llvm-commits
mailing list