SymbolFileDWARFDebugMap::FindTypes didn't obey the max_matches flag,
authorJim Ingham <jingham@apple.com>
Fri, 26 Feb 2016 19:33:11 +0000 (19:33 +0000)
committerJim Ingham <jingham@apple.com>
Fri, 26 Feb 2016 19:33:11 +0000 (19:33 +0000)
but kept looking through .o files even after it had found as many
matches as were requested.

llvm-svn: 262051

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

index 793c81c..6dcf974 100644 (file)
@@ -1297,7 +1297,10 @@ SymbolFileDWARFDebugMap::FindTypes
     {
         ForEachSymbolFile([&](SymbolFileDWARF *oso_dwarf) -> bool {
             oso_dwarf->FindTypes (sc, name, parent_decl_ctx, append, max_matches, searched_symbol_files, types);
-            return false;
+            if (types.GetSize() >= max_matches)
+                return true;
+            else
+                return false;
         });
     }