summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/DWARF
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2017-01-05 23:47:37 +0000
committerGreg Clayton <gclayton@apple.com>2017-01-05 23:47:37 +0000
commit93e4fe8aad0a68f33e8655e6d78f1aa85582674a (patch)
tree1b6c7401a6cc85eb52dd0a5dd57154a98f19aa0e /llvm/lib/DebugInfo/DWARF
parentce542eefe3eb3b4c2e1b40d3dfda55f0f8183904 (diff)
downloadbcm5719-llvm-93e4fe8aad0a68f33e8655e6d78f1aa85582674a.tar.gz
bcm5719-llvm-93e4fe8aad0a68f33e8655e6d78f1aa85582674a.zip
Add iterator support to DWARFDie to allow child DIE iteration.
Differential Revision: https://reviews.llvm.org/D28303 llvm-svn: 291194
Diffstat (limited to 'llvm/lib/DebugInfo/DWARF')
-rw-r--r--llvm/lib/DebugInfo/DWARF/DWARFDie.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFDie.cpp b/llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
index deec1633022..2aac3474654 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
@@ -299,11 +299,8 @@ DWARFDie::collectChildrenAddressRanges(DWARFAddressRangesVector& Ranges) const {
Ranges.insert(Ranges.end(), DIERanges.begin(), DIERanges.end());
}
- DWARFDie Child = getFirstChild();
- while (Child) {
+ for (auto Child: children())
Child.collectChildrenAddressRanges(Ranges);
- Child = Child.getSibling();
- }
}
bool DWARFDie::addressRangeContainsAddress(const uint64_t Address) const {
OpenPOWER on IntegriCloud