diff options
author | Jim Laskey <jlaskey@mac.com> | 2006-11-04 10:48:07 +0000 |
---|---|---|
committer | Jim Laskey <jlaskey@mac.com> | 2006-11-04 10:48:07 +0000 |
commit | 5cd496e72773985590a7dfc003279459951c81d7 (patch) | |
tree | 90a85b5278758982a571455ac6753073e0807390 /lib/CodeGen/DwarfWriter.cpp | |
parent | 95f6edeff5ab6de9cf5589f662c8e7a6ba119c2c (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31454 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/DwarfWriter.cpp')
-rw-r--r-- | lib/CodeGen/DwarfWriter.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/CodeGen/DwarfWriter.cpp b/lib/CodeGen/DwarfWriter.cpp index 40518eb209..1c33cd85f1 100644 --- a/lib/CodeGen/DwarfWriter.cpp +++ b/lib/CodeGen/DwarfWriter.cpp @@ -1862,9 +1862,10 @@ private: 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); |