Skip to content

Commit da7780c

Browse files
Michael137labath
andauthored
fixup! simplify GetAttributes loop
Co-authored-by: Pavel Labath <[email protected]>
1 parent 941bd70 commit da7780c

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -368,17 +368,12 @@ DWARFAttributes DWARFDebugInfoEntry::GetAttributes(const DWARFUnit *cu,
368368
llvm::SmallSet<DWARFDebugInfoEntry const *, 3> seen;
369369
seen.insert(this);
370370

371-
while (!worklist.empty()) {
371+
do {
372372
if (!::GetAttributes(cu, worklist, seen, attributes)) {
373373
attributes.Clear();
374374
break;
375375
}
376-
377-
// We visited the current DIE already and were asked not to check the
378-
// rest of the worklist. So bail out.
379-
if (recurse == Recurse::no)
380-
break;
381-
}
376+
} while (!worklist.empty() && recurse == Recurse::yes);
382377

383378
return attributes;
384379
}

0 commit comments

Comments
 (0)