Skip to content

Commit 5802149

Browse files
committed
fixup! add assertion on 'seen' size
1 parent da7780c commit 5802149

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,10 @@ static bool GetAttributes(DWARFUnit const *cu,
289289
llvm::SmallVector<DWARFDIE> &worklist,
290290
llvm::SmallSet<DWARFDebugInfoEntry const *, 3> &seen,
291291
DWARFAttributes &attributes) {
292-
assert(!worklist.empty());
293-
assert(cu);
292+
assert(!worklist.empty() && "Need at least one DIE to visit.");
293+
assert(cu && "Need a valid CU to extract attributes.");
294+
assert(seen.size() >= 1 &&
295+
"Need to have seen at least the currently visited entry.");
294296

295297
DWARFDIE current = worklist.pop_back_val();
296298

0 commit comments

Comments
 (0)