diff options
| author | Caroline Tice <ctice@apple.com> | 2009-09-11 18:25:54 +0000 |
|---|---|---|
| committer | Caroline Tice <ctice@apple.com> | 2009-09-11 18:25:54 +0000 |
| commit | 183a51977128bedcc3c549058c432c29cee9e67e (patch) | |
| tree | 07d3c9e33536fca0196e79d58cfca7441e566214 /llvm/lib/CodeGen/AsmPrinter | |
| parent | 61bfc3adebdb2842b9f30e4f304d7e9a4891986b (diff) | |
| download | bcm5719-llvm-183a51977128bedcc3c549058c432c29cee9e67e.tar.gz bcm5719-llvm-183a51977128bedcc3c549058c432c29cee9e67e.zip | |
Don't generate Dwarf line table entries for source line 0.
llvm-svn: 81542
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter')
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 29446a427ce..577f111ff60 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -494,6 +494,10 @@ void DwarfDebug::AddSourceLine(DIE *Die, const DISubprogram *SP) { // 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 @@ void DwarfDebug::EmitDebugLines() { unsigned LabelID = MMI->MappedLabel(LineInfo.getLabelID()); if (!LabelID) continue; + if (LineInfo.getLine() == 0) continue; + if (!Asm->isVerbose()) Asm->EOL(); else { |

