diff options
author | Devang Patel <dpatel@apple.com> | 2010-05-19 21:26:53 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2010-05-19 21:26:53 +0000 |
commit | f4ccaeaef93c56af7017b7e503888e8a0f6d8851 (patch) | |
tree | 350d41c35054eeab98ccede6606a43b6b4740e88 | |
parent | 591466baff32bd76aa3329e18092c0c09528f826 (diff) |
There is no need to maintain InsnsBeginScopeSet separately.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104165 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 16 | ||||
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.h | 2 |
2 files changed, 5 insertions, 13 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index ce13945583..4287c115bd 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -2230,11 +2230,8 @@ void DwarfDebug::beginScope(const MachineInstr *MI) { Label = recordSourceLine(DL.getLine(), DL.getCol(), 0); PrevInstLoc = DL; PrevLabel = Label; - } - - // If this instruction begins a scope then note down corresponding label. - if (InsnsBeginScopeSet.count(MI) != 0) LabelsBeforeInsn[MI] = Label; + } } return; @@ -2258,6 +2255,7 @@ void DwarfDebug::beginScope(const MachineInstr *MI) { Label = recordSourceLine(DL.getLine(), DL.getCol(), Scope); PrevInstLoc = DL; PrevLabel = Label; + LabelsBeforeInsn[MI] = Label; } DI->second->setDbgValueLabel(Label); } @@ -2273,11 +2271,9 @@ void DwarfDebug::beginScope(const MachineInstr *MI) { Label = recordSourceLine(DL.getLine(), DL.getCol(), Scope); PrevInstLoc = DL; PrevLabel = Label; + LabelsBeforeInsn[MI] = Label; } - // If this instruction begins a scope then note down corresponding label. - if (InsnsBeginScopeSet.count(MI) != 0) - LabelsBeforeInsn[MI] = Label; } /// endScope - Process end of a scope. @@ -2535,9 +2531,8 @@ void DwarfDebug::identifyScopeMarkers() { continue; for (SmallVector<DbgRange, 4>::const_iterator RI = Ranges.begin(), RE = Ranges.end(); RI != RE; ++RI) { - assert(RI->first && "DbgRange does not have first instruction!"); - assert(RI->second && "DbgRange does not have second instruction!"); - InsnsBeginScopeSet.insert(RI->first); + assert(RI->first && "DbgRange does not have first instruction!"); + assert(RI->second && "DbgRange does not have second instruction!"); InsnsEndScopeSet.insert(RI->second); } } @@ -2631,7 +2626,6 @@ void DwarfDebug::endFunction(const MachineFunction *MF) { // Clear debug info CurrentFnDbgScope = NULL; DeleteContainerSeconds(DbgScopeMap); - InsnsBeginScopeSet.clear(); InsnsEndScopeSet.clear(); DbgValueStartMap.clear(); ConcreteScopes.clear(); diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.h b/lib/CodeGen/AsmPrinter/DwarfDebug.h index 48a52623c3..2c4c9b6600 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.h +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.h @@ -179,8 +179,6 @@ class DwarfDebug { /// corresponds to the MDNode mapped with the subprogram DIE. DenseMap<DIE *, const MDNode *> ContainingTypeMap; - typedef SmallVector<DbgScope *, 2> ScopeVector; - SmallPtrSet<const MachineInstr *, 8> InsnsBeginScopeSet; SmallPtrSet<const MachineInstr *, 8> InsnsEndScopeSet; /// InlineInfo - Keep track of inlined functions and their location. This |