[llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp
Jim Laskey
jlaskey at apple.com
Sat Nov 4 02:48:22 PST 2006
Changes in directory llvm/lib/CodeGen:
DwarfWriter.cpp updated: 1.95 -> 1.96
---
Log message:
Live local variables are being dropped because the begin or end labels marking
their scope are being deleted. Workaround is to widen scope to full function.
---
Diffs of the changes: (+4 -3)
DwarfWriter.cpp | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
Index: llvm/lib/CodeGen/DwarfWriter.cpp
diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.95 llvm/lib/CodeGen/DwarfWriter.cpp:1.96
--- llvm/lib/CodeGen/DwarfWriter.cpp:1.95 Thu Nov 2 17:56:21 2006
+++ llvm/lib/CodeGen/DwarfWriter.cpp Sat Nov 4 04:48:07 2006
@@ -1862,9 +1862,10 @@
unsigned StartID = Scope->getStartLabelID();
unsigned EndID = Scope->getEndLabelID();
- // Throw out scope if block is discarded.
- if (StartID && !DebugInfo->isLabelValid(StartID)) continue;
- if (EndID && !DebugInfo->isLabelValid(EndID)) continue;
+ // Widen scope if label is discarded.
+ // FIXME - really need to find a GOOD label if a block is dead.
+ if (StartID && !DebugInfo->isLabelValid(StartID)) StartID = 0;
+ if (EndID && !DebugInfo->isLabelValid(EndID)) EndID = 0;
DIE *ScopeDie = new DIE(DW_TAG_lexical_block);
More information about the llvm-commits
mailing list