summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2011-08-15 21:43:21 +0000
committerDevang Patel <dpatel@apple.com>2011-08-15 21:43:21 +0000
commitd899444347fed6b7e77ac0da922282265045d813 (patch)
tree0cd4d1277c946cca1da4ccc25a91f897c1577877 /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
parent900d97719b6092ea54b11c869283127b9c8aba37 (diff)
downloadbcm5719-llvm-d899444347fed6b7e77ac0da922282265045d813.tar.gz
bcm5719-llvm-d899444347fed6b7e77ac0da922282265045d813.zip
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
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 0fa820dee21..07268abf05d 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -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;
}
OpenPOWER on IntegriCloud