1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00

There is no need to maintain a set to keep track of variables that use location expressions. In such cases, AT_location attribute's value will be a label.

llvm-svn: 137659
This commit is contained in:
Devang Patel 2011-08-15 21:43:21 +00:00
parent 9ea2ce9b7b
commit f5e3a86ea0
2 changed files with 2 additions and 8 deletions

View File

@ -412,7 +412,6 @@ DIE *DwarfDebug::constructVariableDIE(DbgVariable *DV, LexicalScope *Scope) {
dwarf::DW_FORM_data4,
Asm->GetTempSymbol("debug_loc", Offset));
DV->setDIE(VariableDie);
UseDotDebugLocEntry.insert(VariableDie);
return VariableDie;
}
@ -1676,10 +1675,9 @@ void DwarfDebug::emitDIE(DIE *Die) {
break;
}
case dwarf::DW_AT_location: {
if (UseDotDebugLocEntry.count(Die) != 0) {
DIELabel *L = cast<DIELabel>(Values[i]);
if (DIELabel *L = dyn_cast<DIELabel>(Values[i]))
Asm->EmitLabelDifference(L->getValue(), DwarfDebugLocSectionSym, 4);
} else
else
Values[i]->EmitValue(Asm, Form);
break;
}

View File

@ -234,10 +234,6 @@ class DwarfDebug {
/// DotDebugLocEntries - Collection of DotDebugLocEntry.
SmallVector<DotDebugLocEntry, 4> DotDebugLocEntries;
/// UseDotDebugLocEntry - DW_AT_location attributes for the DIEs in this set
/// idetifies corresponding .debug_loc entry offset.
SmallPtrSet<const DIE *, 4> UseDotDebugLocEntry;
/// InliendSubprogramDIEs - Collection of subprgram DIEs that are marked
/// (at the end of the module) as DW_AT_inline.
SmallPtrSet<DIE *, 4> InlinedSubprogramDIEs;