diff options
author | Chris Lattner <sabre@nondot.org> | 2010-04-04 05:04:31 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-04-04 05:04:31 +0000 |
commit | 701291627546fd45a83cfdce2a3e3aedde3f4726 (patch) | |
tree | d1178bfa5d5f8035c82a2ff408848fcc01906f05 /llvm/tools/llvm-mc/Disassembler.cpp | |
parent | 76c564b1bb732a92bbb4a9685fe3dc6a2d65fbdd (diff) | |
download | bcm5719-llvm-701291627546fd45a83cfdce2a3e3aedde3f4726.tar.gz bcm5719-llvm-701291627546fd45a83cfdce2a3e3aedde3f4726.zip |
fix an ugly wart in the MCInstPrinter api where the
raw_ostream to print an instruction to had to be specified
at MCInstPrinter construction time instead of being able
to pick at each call to printInstruction.
llvm-svn: 100307
Diffstat (limited to 'llvm/tools/llvm-mc/Disassembler.cpp')
-rw-r--r-- | llvm/tools/llvm-mc/Disassembler.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/tools/llvm-mc/Disassembler.cpp b/llvm/tools/llvm-mc/Disassembler.cpp index 0caf539ac95..9fe07909284 100644 --- a/llvm/tools/llvm-mc/Disassembler.cpp +++ b/llvm/tools/llvm-mc/Disassembler.cpp @@ -48,8 +48,8 @@ public: } static bool PrintInsts(const MCDisassembler &DisAsm, - MCInstPrinter &Printer, const ByteArrayTy &Bytes, - SourceMgr &SM) { + MCInstPrinter &Printer, const ByteArrayTy &Bytes, + SourceMgr &SM) { // Wrap the vector in a MemoryObject. VectorMemoryObject memoryObject(Bytes); @@ -62,7 +62,7 @@ static bool PrintInsts(const MCDisassembler &DisAsm, if (DisAsm.getInstruction(Inst, Size, memoryObject, Index, /*REMOVE*/ nulls())) { - Printer.printInst(&Inst); + Printer.printInst(&Inst, outs()); outs() << "\n"; } else { @@ -92,7 +92,7 @@ int Disassembler::disassemble(const Target &T, const std::string &Triple, return -1; } - OwningPtr<MCInstPrinter> IP(T.createMCInstPrinter(0, *AsmInfo, outs())); + OwningPtr<MCInstPrinter> IP(T.createMCInstPrinter(0, *AsmInfo)); if (!IP) { errs() << "error: no instruction printer for target " << Triple << '\n'; return -1; |