diff options
author | Oleksiy Vyalov <ovyalov@google.com> | 2015-03-24 23:45:49 +0000 |
---|---|---|
committer | Oleksiy Vyalov <ovyalov@google.com> | 2015-03-24 23:45:49 +0000 |
commit | 037f6b9c0f52ed46882ec8800a6c3aeff3a84d35 (patch) | |
tree | ca9a1f2c4d69a5115a61ead93c5756f7c6742e6e /lldb/source/Utility/ModuleCache.cpp | |
parent | 6ba3831ebeb147823e7ef0b62a42b558cbafc3da (diff) | |
download | bcm5719-llvm-037f6b9c0f52ed46882ec8800a6c3aeff3a84d35.tar.gz bcm5719-llvm-037f6b9c0f52ed46882ec8800a6c3aeff3a84d35.zip |
Fix ModuleCache usage in Platform - ask remote platform for module's ModuleSpec beforehand so we can look for a module by UUID locally without need to download it.
http://reviews.llvm.org/D8557
llvm-svn: 233136
Diffstat (limited to 'lldb/source/Utility/ModuleCache.cpp')
-rw-r--r-- | lldb/source/Utility/ModuleCache.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lldb/source/Utility/ModuleCache.cpp b/lldb/source/Utility/ModuleCache.cpp index 3040e12f1d6..41b99bb3f96 100644 --- a/lldb/source/Utility/ModuleCache.cpp +++ b/lldb/source/Utility/ModuleCache.cpp @@ -82,7 +82,8 @@ Error ModuleCache::Get (const FileSpec &root_dir_spec, const char *hostname, const ModuleSpec &module_spec, - ModuleSP &cached_module_sp) + ModuleSP &cached_module_sp, + bool *did_create_ptr) { const auto find_it = m_loaded_modules.find (module_spec.GetUUID ().GetAsString()); if (find_it != m_loaded_modules.end ()) @@ -109,6 +110,8 @@ ModuleCache::Get (const FileSpec &root_dir_spec, cached_module_spec.GetFileSpec () = module_file_path; cached_module_spec.GetPlatformFileSpec () = module_spec.GetFileSpec (); cached_module_sp.reset (new Module (cached_module_spec)); + if (did_create_ptr) + *did_create_ptr = true; m_loaded_modules.insert (std::make_pair (module_spec.GetUUID ().GetAsString (), cached_module_sp)); |