projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f411163
)
Don't generate Dwarf line table entries for source line 0.
author
Caroline Tice
<ctice@apple.com>
Fri, 11 Sep 2009 18:25:54 +0000
(18:25 +0000)
committer
Caroline Tice
<ctice@apple.com>
Fri, 11 Sep 2009 18:25:54 +0000
(18:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81542
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/CodeGen/AsmPrinter/DwarfDebug.cpp
patch
|
blob
|
history
diff --git
a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 29446a427cec18ef7cb1dd0e1159262f96a17f4e..577f111ff60265a1a9f9b76636b8bd8af5bb6936 100644
(file)
--- a/
lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/
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 {