summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2019-10-17 19:56:40 +0000
committerAdrian Prantl <aprantl@apple.com>2019-10-17 19:56:40 +0000
commit1ad655e255090620705eb4ce85d869a54d971912 (patch)
tree0aea7b3e59e4569096a15f8ab9f661e4595983b7 /lldb/source/Target
parente3905dee0044c8b6c5f3a9cf46b9b6fe45039da6 (diff)
downloadbcm5719-llvm-1ad655e255090620705eb4ce85d869a54d971912.tar.gz
bcm5719-llvm-1ad655e255090620705eb4ce85d869a54d971912.zip
Modernize the rest of the Find.* API (NFC)
This patch removes the size_t return value and the append parameter from the remainder of the Find.* functions in LLDB's internal API. As in the previous patches, this is motivated by the fact that these parameters aren't really used, and in the case of the append parameter were frequently implemented incorrectly. Differential Revision: https://reviews.llvm.org/D69119 llvm-svn: 375160
Diffstat (limited to 'lldb/source/Target')
-rw-r--r--lldb/source/Target/Target.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp
index ca80e36a022..4b9a1b77ad1 100644
--- a/lldb/source/Target/Target.cpp
+++ b/lldb/source/Target/Target.cpp
@@ -1648,11 +1648,11 @@ bool Target::ModuleIsExcludedForUnconstrainedSearches(
if (GetBreakpointsConsultPlatformAvoidList()) {
ModuleList matchingModules;
ModuleSpec module_spec(module_file_spec);
- size_t num_modules = GetImages().FindModules(module_spec, matchingModules);
+ GetImages().FindModules(module_spec, matchingModules);
+ size_t num_modules = matchingModules.GetSize();
- // If there is more than one module for this file spec, only return true if
- // ALL the modules are on the
- // black list.
+ // If there is more than one module for this file spec, only
+ // return true if ALL the modules are on the black list.
if (num_modules > 0) {
for (size_t i = 0; i < num_modules; i++) {
if (!ModuleIsExcludedForUnconstrainedSearches(
@@ -2059,11 +2059,9 @@ ModuleSP Target::GetOrCreateModule(const ModuleSpec &module_spec, bool notify,
module_spec_copy.GetUUID().Clear();
ModuleList found_modules;
- size_t num_found =
- m_images.FindModules(module_spec_copy, found_modules);
- if (num_found == 1) {
+ m_images.FindModules(module_spec_copy, found_modules);
+ if (found_modules.GetSize() == 1)
old_module_sp = found_modules.GetModuleAtIndex(0);
- }
}
}
OpenPOWER on IntegriCloud