diff options
author | Adrian Prantl <aprantl@apple.com> | 2019-10-01 15:40:41 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2019-10-01 15:40:41 +0000 |
commit | 3cd66b3533cc533d6942cfa9e622463a09e0808e (patch) | |
tree | 8756727150ac4ed77624bbe5983a03adcd61d429 /source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp | |
parent | 3c88bb86f6c0497fd9426ff33dd6fbfc191e05f6 (diff) |
Remove size_t return parameter from FindTypes
In r368345 I accidentally introduced a regression that would
over-report the number of matches found by FindTypes if the
DeclContext Filter was hit.
This patch simply removes the size_t return parameter altogether —
it's not that useful.
rdar://problem/55500457
Differential Revision: https://reviews.llvm.org/D68169
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@373344 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp')
-rw-r--r-- | source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp | 35 |
1 files changed, 13 insertions, 22 deletions
diff --git a/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp b/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp index 4d2ed0ffc..ceaa87745 100644 --- a/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp +++ b/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp @@ -1250,33 +1250,28 @@ uint32_t SymbolFileNativePDB::FindFunctions(const RegularExpression ®ex, return 0; } -uint32_t SymbolFileNativePDB::FindTypes( +void SymbolFileNativePDB::FindTypes( ConstString name, const CompilerDeclContext *parent_decl_ctx, - uint32_t max_matches, - llvm::DenseSet<SymbolFile *> &searched_symbol_files, TypeMap &types) { + uint32_t max_matches, llvm::DenseSet<SymbolFile *> &searched_symbol_files, + TypeMap &types) { std::lock_guard<std::recursive_mutex> guard(GetModuleMutex()); if (!name) - return 0; + return; searched_symbol_files.clear(); searched_symbol_files.insert(this); // There is an assumption 'name' is not a regex - size_t match_count = FindTypesByName(name.GetStringRef(), max_matches, types); - - return match_count; + FindTypesByName(name.GetStringRef(), max_matches, types); } -size_t SymbolFileNativePDB::FindTypes(llvm::ArrayRef<CompilerContext> pattern, - LanguageSet languages, TypeMap &types) { - return 0; -} +void SymbolFileNativePDB::FindTypes(llvm::ArrayRef<CompilerContext> pattern, + LanguageSet languages, TypeMap &types) {} -size_t SymbolFileNativePDB::FindTypesByName(llvm::StringRef name, - uint32_t max_matches, - TypeMap &types) { +void SymbolFileNativePDB::FindTypesByName(llvm::StringRef name, + uint32_t max_matches, + TypeMap &types) { - size_t match_count = 0; std::vector<TypeIndex> matches = m_index->tpi().findRecordsByName(name); if (max_matches > 0 && max_matches < matches.size()) matches.resize(max_matches); @@ -1287,9 +1282,7 @@ size_t SymbolFileNativePDB::FindTypesByName(llvm::StringRef name, continue; types.Insert(type); - ++match_count; } - return match_count; } size_t SymbolFileNativePDB::ParseTypes(CompileUnit &comp_unit) { @@ -1578,11 +1571,9 @@ bool SymbolFileNativePDB::CompleteType(CompilerType &compiler_type) { return m_ast->CompleteType(qt); } -size_t SymbolFileNativePDB::GetTypes(lldb_private::SymbolContextScope *sc_scope, - TypeClass type_mask, - lldb_private::TypeList &type_list) { - return 0; -} +void SymbolFileNativePDB::GetTypes(lldb_private::SymbolContextScope *sc_scope, + TypeClass type_mask, + lldb_private::TypeList &type_list) {} CompilerDeclContext SymbolFileNativePDB::FindNamespace(ConstString name, |