summaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2009-06-14 09:23:33 +0000
committerEd Schouten <ed@FreeBSD.org>2009-06-14 09:23:33 +0000
commit600c6fa13de5c407dc36dbb0ab73807868741ae0 (patch)
tree49817b316c4fdaa56d9d16ebf2555303d1a990e0 /lib/CodeGen/AsmPrinter/DwarfDebug.cpp
parent93338c197185f946619794ce011ec27b5b6250e2 (diff)
Notes
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 5a66f4b04b935..c773378bb0156 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -1581,6 +1581,7 @@ void DwarfDebug::EndFunction(MachineFunction *MF) {
FunctionDbgScope = NULL;
LexicalScopeStack.clear();
AbstractInstanceRootList.clear();
+ AbstractInstanceRootMap.clear();
}
Lines.clear();
@@ -1669,7 +1670,11 @@ unsigned DwarfDebug::RecordRegionEnd(GlobalVariable *V) {
DbgScope *Scope = getOrCreateScope(V);
unsigned ID = MMI->NextLabelID();
Scope->setEndLabelID(ID);
- if (LexicalScopeStack.size() != 0)
+ // FIXME : region.end() may not be in the last basic block.
+ // For now, do not pop last lexical scope because next basic
+ // block may start new inlined function's body.
+ unsigned LSSize = LexicalScopeStack.size();
+ if (LSSize != 0 && LSSize != 1)
LexicalScopeStack.pop_back();
if (TimePassesIsEnabled)