[lldb] Inline Platform::LoadCachedExecutable into its (single) caller
This commit is contained in:
parent
ee0c75eba3
commit
a6e673643c
|
@ -953,10 +953,6 @@ private:
|
|||
bool GetCachedSharedModule(const ModuleSpec &module_spec,
|
||||
lldb::ModuleSP &module_sp, bool *did_create_ptr);
|
||||
|
||||
Status LoadCachedExecutable(const ModuleSpec &module_spec,
|
||||
lldb::ModuleSP &module_sp,
|
||||
const FileSpecList *module_search_paths_ptr);
|
||||
|
||||
FileSpec GetModuleCacheRoot();
|
||||
};
|
||||
|
||||
|
|
|
@ -1547,28 +1547,20 @@ Status
|
|||
Platform::GetCachedExecutable(ModuleSpec &module_spec,
|
||||
lldb::ModuleSP &module_sp,
|
||||
const FileSpecList *module_search_paths_ptr) {
|
||||
const auto platform_spec = module_spec.GetFileSpec();
|
||||
const auto error =
|
||||
LoadCachedExecutable(module_spec, module_sp, module_search_paths_ptr);
|
||||
if (error.Success()) {
|
||||
module_spec.GetFileSpec() = module_sp->GetFileSpec();
|
||||
module_spec.GetPlatformFileSpec() = platform_spec;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
Status
|
||||
Platform::LoadCachedExecutable(const ModuleSpec &module_spec,
|
||||
lldb::ModuleSP &module_sp,
|
||||
const FileSpecList *module_search_paths_ptr) {
|
||||
return GetRemoteSharedModule(
|
||||
FileSpec platform_spec = module_spec.GetFileSpec();
|
||||
Status error = GetRemoteSharedModule(
|
||||
module_spec, nullptr, module_sp,
|
||||
[&](const ModuleSpec &spec) {
|
||||
return ResolveRemoteExecutable(spec, module_sp,
|
||||
module_search_paths_ptr);
|
||||
},
|
||||
nullptr);
|
||||
if (error.Success()) {
|
||||
module_spec.GetFileSpec() = module_sp->GetFileSpec();
|
||||
module_spec.GetPlatformFileSpec() = platform_spec;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
Status Platform::GetRemoteSharedModule(const ModuleSpec &module_spec,
|
||||
|
|
Loading…
Reference in New Issue