Changes in directory llvm/lib/Target/PowerPC:

PPCAsmPrinter.cpp updated: 1.128 -> 1.129
PPCInstrInfo.td updated: 1.160 -> 1.161
---
Log message:

Added source file/line correspondence for dwarf (PowerPC only at this point.)


---
Diffs of the changes:  (+17 -0)

 PPCAsmPrinter.cpp |    8 ++++++++
 PPCInstrInfo.td   |    9 +++++++++
 2 files changed, 17 insertions(+)


Index: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
diff -u llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.128 
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.129
--- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.128     Fri Dec 16 15:46:14 2005
+++ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp   Fri Dec 16 16:45:29 2005
@@ -25,6 +25,7 @@
 #include "llvm/Module.h"
 #include "llvm/Assembly/Writer.h"
 #include "llvm/CodeGen/AsmPrinter.h"
+#include "llvm/CodeGen/MachineDebugInfo.h"
 #include "llvm/CodeGen/MachineFunctionPass.h"
 #include "llvm/CodeGen/MachineInstr.h"
 #include "llvm/Support/Mangler.h"
@@ -375,6 +376,13 @@
 bool DarwinAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
   SetupMachineFunction(MF);
   O << "\n\n";
+  
+  // Print out dwarf file info
+  MachineDebugInfo &DebugInfo = MF.getDebugInfo();
+  std::vector<std::string> Sources = DebugInfo.getSourceFiles();
+  for (unsigned i = 0, N = Sources.size(); i < N; i++) {
+    O << "\t; .file\t" << (i + 1) << "," << "\"" << Sources[i]  << "\"" << 
"\n";
+  }
 
   // Print out constants referenced by the function
   EmitConstantPool(MF.getConstantPool());


Index: llvm/lib/Target/PowerPC/PPCInstrInfo.td
diff -u llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.160 
llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.161
--- llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.160       Fri Dec 16 03:19:13 2005
+++ llvm/lib/Target/PowerPC/PPCInstrInfo.td     Fri Dec 16 16:45:29 2005
@@ -922,6 +922,15 @@
 
 
 
//===----------------------------------------------------------------------===//
+// DWARF Pseudo Instructions
+//
+
+def DWARF_LOC        : Pseudo<(ops i32imm:$line, i32imm:$col, i32imm:$file),
+                              "; .loc $file, $line, $col",
+                      [(dwarf_loc (i32 imm:$line), (i32 imm:$col),
+                                  (i32 imm:$file))]>;
+
+//===----------------------------------------------------------------------===//
 // PowerPC Instruction Patterns
 //
 



_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to