[llvm-commits] [llvm] r81542 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Caroline Tice
ctice at apple.com
Fri Sep 11 11:25:55 PDT 2009
Author: ctice
Date: Fri Sep 11 13:25:54 2009
New Revision: 81542
URL: http://llvm.org/viewvc/llvm-project?rev=81542&view=rev
Log:
Don't generate Dwarf line table entries for source line 0.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=81542&r1=81541&r2=81542&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Fri Sep 11 13:25:54 2009
@@ -494,6 +494,10 @@
// If there is no compile unit specified, don't add a line #.
if (SP->getCompileUnit().isNull())
return;
+ // If the line number is 0, don't add it.
+ if (SP->getLineNumber() == 0)
+ return;
+
unsigned Line = SP->getLineNumber();
unsigned FileID = FindCompileUnit(SP->getCompileUnit()).getID();
@@ -2394,6 +2398,8 @@
unsigned LabelID = MMI->MappedLabel(LineInfo.getLabelID());
if (!LabelID) continue;
+ if (LineInfo.getLine() == 0) continue;
+
if (!Asm->isVerbose())
Asm->EOL();
else {
More information about the llvm-commits
mailing list