From 321bc99a749b70da11d3584a637359bac587003c Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 9 Sep 2009 23:14:36 +0000 Subject: remove DebugLoc from MCInst and eliminate "Comment printing" from the MCInst path of the asmprinter. Instead, pull comment printing out of the autogenerated asmprinter into each target that uses the autogenerated asmprinter. This causes code duplication into each target, but in a way that will be easier to clean up later when more asmprinter stuff is commonized into the base AsmPrinter class. This also fixes an xcore strangeness where it inserted two tabs before every instruction. llvm-svn: 81396 --- llvm/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'llvm/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp') diff --git a/llvm/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp b/llvm/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp index a92aa4850ef..fecd2ea33a9 100644 --- a/llvm/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp +++ b/llvm/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp @@ -603,6 +603,10 @@ void PPCAsmPrinter::printMachineInstruction(const MachineInstr *MI) { } printInstruction(MI); + + if (VerboseAsm && !MI->getDebugLoc().isUnknown()) + EmitComments(*MI); + O << '\n'; } /// runOnMachineFunction - This uses the printMachineInstruction() -- cgit v1.2.3