[llvm-commits] [llvm] r100339 - in /llvm/trunk: include/llvm/CodeGen/AsmPrinter.h lib/CodeGen/AsmPrinter/AsmPrinter.cpp
Chris Lattner
sabre at nondot.org
Sun Apr 4 11:18:51 PDT 2010
Author: lattner
Date: Sun Apr 4 13:18:51 2010
New Revision: 100339
URL: http://llvm.org/viewvc/llvm-project?rev=100339&view=rev
Log:
inline processDebugLoc and simplify it.
Modified:
llvm/trunk/include/llvm/CodeGen/AsmPrinter.h
llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
Modified: llvm/trunk/include/llvm/CodeGen/AsmPrinter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/AsmPrinter.h?rev=100339&r1=100338&r2=100339&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/AsmPrinter.h (original)
+++ llvm/trunk/include/llvm/CodeGen/AsmPrinter.h Sun Apr 4 13:18:51 2010
@@ -339,11 +339,7 @@
/// EmitInlineAsm - Emit a blob of inline asm to the output streamer.
void EmitInlineAsm(StringRef Str) const;
- /// processDebugLoc - Processes the debug information of each machine
- /// instruction's DebugLoc.
- void processDebugLoc(const MachineInstr *MI, bool BeforePrintingInsn);
-
- /// EmitInlineAsm - This method formats and emits the specified machine
+ /// EmitInlineAsm - This method formats and emits the specified machine
/// instruction that is an inline asm.
void EmitInlineAsm(const MachineInstr *MI) const;
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=100339&r1=100338&r2=100339&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Sun Apr 4 13:18:51 2010
@@ -416,6 +416,9 @@
// Emit target-specific gunk before the function body.
EmitFunctionBodyStart();
+ bool ShouldPrintDebugScopes =
+ DW && MAI->doesSupportDebugInformation() &&DW->ShouldEmitDwarfDebug();
+
// Print out code for the function.
bool HasAnyRealCode = false;
for (MachineFunction::const_iterator I = MF->begin(), E = MF->end();
@@ -430,8 +433,8 @@
++EmittedInsts;
- // FIXME: Clean up processDebugLoc.
- processDebugLoc(II, true);
+ if (ShouldPrintDebugScopes)
+ DW->BeginScope(II);
if (VerboseAsm)
EmitComments(*II, OutStreamer.GetCommentOS());
@@ -456,8 +459,8 @@
break;
}
- // FIXME: Clean up processDebugLoc.
- processDebugLoc(II, false);
+ if (ShouldPrintDebugScopes)
+ DW->EndScope(II);
}
}
@@ -1376,21 +1379,6 @@
}
}
-/// processDebugLoc - Processes the debug information of each machine
-/// instruction's DebugLoc.
-void AsmPrinter::processDebugLoc(const MachineInstr *MI,
- bool BeforePrintingInsn) {
- if (!DW || !MAI->doesSupportDebugInformation() || !DW->ShouldEmitDwarfDebug())
- return;
-
- if (!BeforePrintingInsn)
- // After printing instruction
- DW->EndScope(MI);
- else
- DW->BeginScope(MI);
-}
-
-
/// EmitInlineAsm - This method formats and emits the specified machine
/// instruction that is an inline asm.
void AsmPrinter::EmitInlineAsm(const MachineInstr *MI) const {
More information about the llvm-commits
mailing list