aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/CellSPU
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
commite34788cb7ed482bf3b51075f1b06ccc03021fbac (patch)
treed70c09f8cbdfa5ec56a45363d4710e1213595b1d /lib/Target/CellSPU
parenta46d337b041e98c716269c600e3097cc5cca64ae (diff)
downloadexternal_llvm-e34788cb7ed482bf3b51075f1b06ccc03021fbac.zip
external_llvm-e34788cb7ed482bf3b51075f1b06ccc03021fbac.tar.gz
external_llvm-e34788cb7ed482bf3b51075f1b06ccc03021fbac.tar.bz2
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/CellSPU')
-rw-r--r--lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp b/lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp
index fde999f..230f0f5 100644
--- a/lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp
+++ b/lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp
@@ -408,15 +408,14 @@ bool SPUAsmPrinter::PrintAsmMemoryOperand(const MachineInstr *MI,
///
void SPUAsmPrinter::printMachineInstruction(const MachineInstr *MI) {
++EmittedInsts;
+ processDebugLoc(MI->getDebugLoc());
printInstruction(MI);
}
/// runOnMachineFunction - This uses the printMachineInstruction()
/// method to print assembly for each instruction.
///
-bool
-LinuxAsmPrinter::runOnMachineFunction(MachineFunction &MF)
-{
+bool LinuxAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
this->MF = &MF;
SetupMachineFunction(MF);