1
0
mirror of https://github.com/c64scene-ar/llvm-6502.git synced 2025-03-15 22:32:35 +00:00

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
This commit is contained in:
Jim Laskey 2006-11-04 10:48:07 +00:00
parent 95f6edeff5
commit 5cd496e727

@ -1862,9 +1862,10 @@ private:
unsigned StartID = Scope->getStartLabelID(); unsigned StartID = Scope->getStartLabelID();
unsigned EndID = Scope->getEndLabelID(); unsigned EndID = Scope->getEndLabelID();
// Throw out scope if block is discarded. // Widen scope if label is discarded.
if (StartID && !DebugInfo->isLabelValid(StartID)) continue; // FIXME - really need to find a GOOD label if a block is dead.
if (EndID && !DebugInfo->isLabelValid(EndID)) continue; if (StartID && !DebugInfo->isLabelValid(StartID)) StartID = 0;
if (EndID && !DebugInfo->isLabelValid(EndID)) EndID = 0;
DIE *ScopeDie = new DIE(DW_TAG_lexical_block); DIE *ScopeDie = new DIE(DW_TAG_lexical_block);