From fcab66d5fe53fc3c318b0d0c4ef1bb4a43a7744f Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Sat, 4 Apr 2020 00:12:59 +0200 Subject: [PATCH] [lldb] Findtypes -gmodules fix for too many matches Apparently the intention was to copy the condition above: if (types.GetSize() >= max_matches) break; So that if the iteration stopped because of too many matches we do not add even more matches in this 'Clang modules' block downward. It was implemented by: SymbolFileDWARF: Unconditionally scan through clang modules. NFCish fe9eaadd68307347d97698fd0a1646827eafd290 Differential Revision: https://reviews.llvm.org/D77336 --- lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp index 1113ed1195a3..ab271d2364bd 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp @@ -2407,7 +2407,7 @@ void SymbolFileDWARF::FindTypes( // Next search through the reachable Clang modules. This only applies for // DWARF objects compiled with -gmodules that haven't been processed by // dsymutil. - if (num_die_matches < max_matches) { + if (types.GetSize() < max_matches) { UpdateExternalModuleListIfNeeded(); for (const auto &pair : m_external_type_modules)