Skip to content

Commit 118efa5

Browse files
committed
[LLDB][NFC] Adding clarifying comment in SymbolFileDWARFDebugMap::DumpClangAST(...)
It is not obvious that the code was correct since it would seem as if we want to perform the dump for each symbol file.
1 parent 9fa0f23 commit 118efa5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1225,6 +1225,9 @@ CompilerDeclContext SymbolFileDWARFDebugMap::FindNamespace(
12251225
void SymbolFileDWARFDebugMap::DumpClangAST(Stream &s) {
12261226
ForEachSymbolFile([&s](SymbolFileDWARF *oso_dwarf) -> bool {
12271227
oso_dwarf->DumpClangAST(s);
1228+
// The underlying assumption is that DumpClangAST(...) will obtain the
1229+
// AST from the underlying TypeSystem and therefore we only need to do
1230+
// this once and can stop after the first iteration hence we return true.
12281231
return true;
12291232
});
12301233
}

0 commit comments

Comments
 (0)