Author: Jan Kratochvil
Date: 2020-04-04T00:15:06+02:00
New Revision: fcab66d5fe53fc3c318b0d0c4ef1bb4a43a7744f

URL: 
https://github.com/llvm/llvm-project/commit/fcab66d5fe53fc3c318b0d0c4ef1bb4a43a7744f
DIFF: 
https://github.com/llvm/llvm-project/commit/fcab66d5fe53fc3c318b0d0c4ef1bb4a43a7744f.diff

LOG: [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

Added: 
    

Modified: 
    lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp

Removed: 
    


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


        
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to