[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
  fe9eaadd68

Differential Revision: https://reviews.llvm.org/D77336
This commit is contained in:
Jan Kratochvil 2020-04-04 00:12:59 +02:00
parent 1fcfd30fae
commit fcab66d5fe
1 changed files with 1 additions and 1 deletions

View File

@ -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)