Use MachineInstr as an processDebugLoc() argument.
authorDevang Patel <dpatel@apple.com>
Wed, 30 Sep 2009 23:12:50 +0000 (23:12 +0000)
committerDevang Patel <dpatel@apple.com>
Wed, 30 Sep 2009 23:12:50 +0000 (23:12 +0000)
This will allow processDebugLoc() to handle scopes for DWARF debug info.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83183 91177308-0d34-0410-b5e6-96231b3b80d8

14 files changed:
include/llvm/CodeGen/AsmPrinter.h
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp
lib/Target/Blackfin/AsmPrinter/BlackfinAsmPrinter.cpp
lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp
lib/Target/MSP430/AsmPrinter/MSP430AsmPrinter.cpp
lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp
lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp
lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp
lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp
lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp
lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp
lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp

index 918b5a6b4d72a3a2a092d60423a5f5dc84278922..2f0e8d05417ca88efa4a94a77fde52f5fb97cd37 100644 (file)
@@ -358,7 +358,7 @@ namespace llvm {
 
     /// processDebugLoc - Processes the debug information of each machine
     /// instruction's DebugLoc.
-    void processDebugLoc(DebugLoc DL);
+    void processDebugLoc(const MachineInstr *MI);
     
     /// printInlineAsm - This method formats and prints the specified machine
     /// instruction that is an inline asm.
index c84019be136e59fc02dac53ef99bfcd12cda801c..484ce94ffcda5e898b076714a7bb8d81925879a3 100644 (file)
@@ -1347,10 +1347,10 @@ void AsmPrinter::PrintSpecial(const MachineInstr *MI, const char *Code) const {
 
 /// processDebugLoc - Processes the debug information of each machine
 /// instruction's DebugLoc.
-void AsmPrinter::processDebugLoc(DebugLoc DL) {
+void AsmPrinter::processDebugLoc(const MachineInstr *MI) {
   if (!MAI || !DW)
     return;
-  
+  DebugLoc DL = MI->getDebugLoc();
   if (MAI->doesSupportDebugInformation() && DW->ShouldEmitDwarfDebug()) {
     if (!DL.isUnknown()) {
       DebugLocTuple CurDLT = MF->getDebugLocTuple(DL);
index 5d14a9b4d3f9f0bb61fee65f6717ff5ea967d80c..bc0c0e7523217cd5c00fe06a8955fe28a523e0db 100644 (file)
@@ -1036,7 +1036,7 @@ void ARMAsmPrinter::printMachineInstruction(const MachineInstr *MI) {
   }}
 
   // Call the autogenerated instruction printer routines.
-  processDebugLoc(MI->getDebugLoc());
+  processDebugLoc(MI);
   printInstruction(MI);
   if (VerboseAsm && !MI->getDebugLoc().isUnknown())
     EmitComments(*MI);
index 0e36df3fa31161446b8eb97aa75db3e02af85dc4..aed3b9a7898547bd0d4039d8694b272a4e76433c 100644 (file)
@@ -177,7 +177,7 @@ bool AlphaAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
          II != E; ++II) {
       // Print the assembly for the instruction.
       ++EmittedInsts;
-      processDebugLoc(II->getDebugLoc());
+      processDebugLoc(II);
       
       printInstruction(II);
       
index 6a018af81de530a378e0a1c05fb1713c99902a5c..1bb7678ec8f36f1268ec15a28573f93a3b756b2d 100644 (file)
@@ -146,7 +146,7 @@ bool BlackfinAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
     for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
          II != E; ++II) {
       // Print the assembly for the instruction.
-      processDebugLoc(II->getDebugLoc());
+      processDebugLoc(II);
 
       printInstruction(II);
       if (VerboseAsm && !II->getDebugLoc().isUnknown())
index fc6a76e2710f20b4d5c84b71aa90e08a77636463..02809aff5bef95cf1419b627dce2ab0ecc2fb77e 100644 (file)
@@ -405,7 +405,7 @@ bool SPUAsmPrinter::PrintAsmMemoryOperand(const MachineInstr *MI,
 ///
 void SPUAsmPrinter::printMachineInstruction(const MachineInstr *MI) {
   ++EmittedInsts;
-  processDebugLoc(MI->getDebugLoc());
+  processDebugLoc(MI);
   printInstruction(MI);
 
   if (VerboseAsm && !MI->getDebugLoc().isUnknown())
index d849a837502086154cb31d8f9839f928bad88b72..7dbd5ab483a03479332a355fdb8ec51dd9dea03d 100644 (file)
@@ -148,7 +148,7 @@ bool MSP430AsmPrinter::runOnMachineFunction(MachineFunction &MF) {
 void MSP430AsmPrinter::printMachineInstruction(const MachineInstr *MI) {
   ++EmittedInsts;
 
-  processDebugLoc(MI->getDebugLoc());
+  processDebugLoc(MI);
 
   // Call the autogenerated instruction printer routines.
   printInstruction(MI);
index fb5e5fc93bd6df9aab072013ae0c126a6a0c7f2c..fd6d13eb3a304e3e647e38db91d5fe9057e9f434 100644 (file)
@@ -278,7 +278,7 @@ bool MipsAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
 
     for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
          II != E; ++II) {
-      processDebugLoc(II->getDebugLoc());
+      processDebugLoc(II);
 
       // Print the assembly for the instruction.
       printInstruction(II);
index 7eeefd1c761bcbae7589a0937f51149bcc04857e..a74ad661bc4784c125a8cc3e46fd702422455d3d 100644 (file)
@@ -43,7 +43,7 @@ PIC16AsmPrinter::PIC16AsmPrinter(formatted_raw_ostream &O, TargetMachine &TM,
 }
 
 bool PIC16AsmPrinter::printMachineInstruction(const MachineInstr *MI) {
-  processDebugLoc(MI->getDebugLoc());
+  processDebugLoc(MI);
   
   printInstruction(MI);
   
index f55e6a14786444453272d981db98020f20800621..750cec93b6bcd4c0b3ef2cb279a6d9c9b920f5c7 100644 (file)
@@ -545,7 +545,7 @@ void PPCAsmPrinter::printPredicateOperand(const MachineInstr *MI, unsigned OpNo,
 void PPCAsmPrinter::printMachineInstruction(const MachineInstr *MI) {
   ++EmittedInsts;
   
-  processDebugLoc(MI->getDebugLoc());
+  processDebugLoc(MI);
 
   // Check for slwi/srwi mnemonics.
   if (MI->getOpcode() == PPC::RLWINM) {
index 81ac5324c17c8775a9656ed846336736858e21bf..04e5b69c35416d5350a44c8d18aa49a57c058644 100644 (file)
@@ -124,7 +124,7 @@ bool SparcAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
     for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
          II != E; ++II) {
       // Print the assembly for the instruction.
-      processDebugLoc(II->getDebugLoc());
+      processDebugLoc(II);
       printInstruction(II);
       
       if (VerboseAsm && !II->getDebugLoc().isUnknown())
index 442c46f81dc22416377e90351b219156f96df1b0..5ba964940596c4b1d9a922376a0d9eb47debf6f2 100644 (file)
@@ -156,7 +156,7 @@ bool SystemZAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
 void SystemZAsmPrinter::printMachineInstruction(const MachineInstr *MI) {
   ++EmittedInsts;
 
-  processDebugLoc(MI->getDebugLoc());
+  processDebugLoc(MI);
 
   // Call the autogenerated instruction printer routines.
   printInstruction(MI);
index 153a6344a0ebe1d1f19196e62a8751694b6a06e1..4f89b716c12fd8d5cfdfe12ff959b1188a96dd50 100644 (file)
@@ -653,7 +653,7 @@ bool X86AsmPrinter::PrintAsmMemoryOperand(const MachineInstr *MI,
 void X86AsmPrinter::printMachineInstruction(const MachineInstr *MI) {
   ++EmittedInsts;
 
-  processDebugLoc(MI->getDebugLoc());
+  processDebugLoc(MI);
   
   printInstructionThroughMCStreamer(MI);
   
index 65378df42e415879650651f646f673845111085f..4f17f2f9ff1178e5df161dc31753bb8c3d3a5341 100644 (file)
@@ -352,7 +352,7 @@ bool XCoreAsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
 void XCoreAsmPrinter::printMachineInstruction(const MachineInstr *MI) {
   ++EmittedInsts;
 
-  processDebugLoc(MI->getDebugLoc());
+  processDebugLoc(MI);
 
   // Check for mov mnemonic
   unsigned src, dst, srcSR, dstSR;