1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

llvm-objdump: Take ownership of MCInstrInfos.

llvm-svn: 141535
This commit is contained in:
Benjamin Kramer 2011-10-10 13:10:09 +00:00
parent 357893ba6f
commit 05836b12fd
2 changed files with 2 additions and 8 deletions

View File

@ -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));

View File

@ -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()