summaryrefslogtreecommitdiff
path: root/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-09-09 20:34:59 +0000
committerChris Lattner <sabre@nondot.org>2009-09-09 20:34:59 +0000
commit634cca377a8254cfe8a5afe99ef2e6c6db7f0c6b (patch)
treed70c09f8cbdfa5ec56a45363d4710e1213595b1d /lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp
parent9647994e097840d8ea7bd3ed7014934034f38763 (diff)
downloadllvm-634cca377a8254cfe8a5afe99ef2e6c6db7f0c6b.tar.gz
llvm-634cca377a8254cfe8a5afe99ef2e6c6db7f0c6b.tar.bz2
llvm-634cca377a8254cfe8a5afe99ef2e6c6db7f0c6b.tar.xz
hoist the call to processDebugLoc out of the generated
asm printer into the "printInstruction" routine. This fixes a problem where the experimental asmprinter would drop debug labels in some cases, and fixes issues on ppc/xcore where pseudo instructions like "mr" didn't get debug locs properly. It is annoying that this moves the call from one place into each target, but a future set of more invasive refactorings will fix that problem. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81377 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp')
-rw-r--r--lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp b/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp
index 9ee0e86da1..801a1b33c8 100644
--- a/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp
+++ b/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp
@@ -355,6 +355,8 @@ bool XCoreAsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
void XCoreAsmPrinter::printMachineInstruction(const MachineInstr *MI) {
++EmittedInsts;
+ processDebugLoc(MI->getDebugLoc());
+
// Check for mov mnemonic
unsigned src, dst, srcSR, dstSR;
if (TM.getInstrInfo()->isMoveInstr(*MI, src, dst, srcSR, dstSR)) {