diff options
| author | Devang Patel <dpatel@apple.com> | 2010-06-30 00:11:08 +0000 |
|---|---|---|
| committer | Devang Patel <dpatel@apple.com> | 2010-06-30 00:11:08 +0000 |
| commit | 648df7bf64aeb4fd067e572600a008df1dd368cf (patch) | |
| tree | 49f4d0efa6aa181a258869740951a217a1343723 /llvm/lib | |
| parent | f88891193210359672781ba4905d55fdc88db412 (diff) | |
| download | bcm5719-llvm-648df7bf64aeb4fd067e572600a008df1dd368cf.tar.gz bcm5719-llvm-648df7bf64aeb4fd067e572600a008df1dd368cf.zip | |
Add variables into a scope before constructing scope DIE otherwise variables won't be included DIE tree.
llvm-svn: 107228
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index b983cf2baf5..73aa8d81eeb 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -2746,7 +2746,6 @@ void DwarfDebug::endFunction(const MachineFunction *MF) { // Construct abstract scopes. for (SmallVector<DbgScope *, 4>::iterator AI = AbstractScopesList.begin(), AE = AbstractScopesList.end(); AI != AE; ++AI) { - constructScopeDIE(*AI); DISubprogram SP((*AI)->getScopeNode()); if (SP.Verify()) { // Collect info for variables that were optimized out. @@ -2761,12 +2760,13 @@ void DwarfDebug::endFunction(const MachineFunction *MF) { DIVariable DV(cast_or_null<MDNode>(NMD->getOperand(i))); if (!DV || !ProcessedVars.insert(DV)) continue; - DbgScope *Scope = DbgScopeMap.lookup(DV.getContext()); + DbgScope *Scope = AbstractScopes.lookup(DV.getContext()); if (Scope) Scope->addVariable(new DbgVariable(DV)); } } } + constructScopeDIE(*AI); } DIE *CurFnDIE = constructScopeDIE(CurrentFnDbgScope); |

