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 | 014bba213336acc237d464d594d8dd9fb865e0da (patch) | |
| tree | 5ca56cd4dcb6b9a976bf77ae9b61bc9f7870aba9 /lib/CodeGen/AsmPrinter/DwarfDebug.cpp | |
| parent | c5d099bb328827d677c2af983ac7b22d953749e3 (diff) | |
| download | external_llvm-014bba213336acc237d464d594d8dd9fb865e0da.zip external_llvm-014bba213336acc237d464d594d8dd9fb865e0da.tar.gz external_llvm-014bba213336acc237d464d594d8dd9fb865e0da.tar.bz2 | |
Add variables into a scope before constructing scope DIE otherwise variables won't be included DIE tree.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107228 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
| -rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index b983cf2..73aa8d8 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/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); |
