summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBTarget.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2019-10-01 15:40:41 +0000
committerAdrian Prantl <aprantl@apple.com>2019-10-01 15:40:41 +0000
commitbf9d84c0149b4944d58a00024c8abd98eefc9589 (patch)
treef9d2d3252890e476cbccc4870157536bae355f1c /lldb/source/API/SBTarget.cpp
parent3c912c4abe2bb962c7bddcf52fab6c65bc5899d5 (diff)
downloadbcm5719-llvm-bf9d84c0149b4944d58a00024c8abd98eefc9589.tar.gz
bcm5719-llvm-bf9d84c0149b4944d58a00024c8abd98eefc9589.zip
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 llvm-svn: 373344
Diffstat (limited to 'lldb/source/API/SBTarget.cpp')
-rw-r--r--lldb/source/API/SBTarget.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/lldb/source/API/SBTarget.cpp b/lldb/source/API/SBTarget.cpp
index 10cdf5b93ea..0d0a470e202 100644
--- a/lldb/source/API/SBTarget.cpp
+++ b/lldb/source/API/SBTarget.cpp
@@ -1891,16 +1891,13 @@ lldb::SBTypeList SBTarget::FindTypes(const char *typename_cstr) {
bool exact_match = false;
TypeList type_list;
llvm::DenseSet<SymbolFile *> searched_symbol_files;
- uint32_t num_matches =
- images.FindTypes(nullptr, const_typename, exact_match, UINT32_MAX,
- searched_symbol_files, type_list);
+ images.FindTypes(nullptr, const_typename, exact_match, UINT32_MAX,
+ searched_symbol_files, type_list);
- if (num_matches > 0) {
- for (size_t idx = 0; idx < num_matches; idx++) {
- TypeSP type_sp(type_list.GetTypeAtIndex(idx));
- if (type_sp)
- sb_type_list.Append(SBType(type_sp));
- }
+ for (size_t idx = 0; idx < type_list.GetSize(); idx++) {
+ TypeSP type_sp(type_list.GetTypeAtIndex(idx));
+ if (type_sp)
+ sb_type_list.Append(SBType(type_sp));
}
// Try the loaded language runtimes
OpenPOWER on IntegriCloud