[Lldb-commits] [lldb] d75cc08 - [lldb] Remove PlatformRemoteMacOSX::GetFileWithUUID overload (NFC)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Mon May 2 17:34:47 PDT 2022
Author: Jonas Devlieghere
Date: 2022-05-02T17:34:36-07:00
New Revision: d75cc0859391e90a79bb0de6300d5d69db015421
URL: https://github.com/llvm/llvm-project/commit/d75cc0859391e90a79bb0de6300d5d69db015421
DIFF: https://github.com/llvm/llvm-project/commit/d75cc0859391e90a79bb0de6300d5d69db015421.diff
LOG: [lldb] Remove PlatformRemoteMacOSX::GetFileWithUUID overload (NFC)
There's no reason PlatformRemoteMacOSX has to override GetFileWithUUID.
Added:
Modified:
lldb/source/Plugins/Platform/MacOSX/PlatformRemoteMacOSX.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformRemoteMacOSX.h
Removed:
################################################################################
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteMacOSX.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteMacOSX.cpp
index 99643791ad328..460f6d8bd6170 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteMacOSX.cpp
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteMacOSX.cpp
@@ -70,8 +70,8 @@ PlatformSP PlatformRemoteMacOSX::CreateInstance(bool force,
const char *triple_cstr =
arch ? arch->GetTriple().getTriple().c_str() : "<null>";
- LLDB_LOGF(log, "PlatformMacOSX::%s(force=%s, arch={%s,%s})", __FUNCTION__,
- force ? "true" : "false", arch_name, triple_cstr);
+ LLDB_LOGF(log, "PlatformRemoteMacOSX::%s(force=%s, arch={%s,%s})",
+ __FUNCTION__, force ? "true" : "false", arch_name, triple_cstr);
}
bool create = force;
@@ -141,52 +141,6 @@ PlatformRemoteMacOSX::GetSupportedArchitectures(const ArchSpec &host_info) {
return result;
}
-lldb_private::Status PlatformRemoteMacOSX::GetFileWithUUID(
- const lldb_private::FileSpec &platform_file,
- const lldb_private::UUID *uuid_ptr, lldb_private::FileSpec &local_file) {
- if (m_remote_platform_sp) {
- std::string local_os_build;
-#if !defined(__linux__)
- local_os_build = HostInfo::GetOSBuildString().getValueOr("");
-#endif
- llvm::Optional<std::string> remote_os_build =
- m_remote_platform_sp->GetOSBuildString();
- if (local_os_build == remote_os_build) {
- // same OS version: the local file is good enough
- local_file = platform_file;
- return Status();
- } else {
- // try to find the file in the cache
- std::string cache_path(GetLocalCacheDirectory());
- std::string module_path(platform_file.GetPath());
- cache_path.append(module_path);
- FileSpec module_cache_spec(cache_path);
- if (FileSystem::Instance().Exists(module_cache_spec)) {
- local_file = module_cache_spec;
- return Status();
- }
- // bring in the remote module file
- FileSpec module_cache_folder =
- module_cache_spec.CopyByRemovingLastPathComponent();
- // try to make the local directory first
- Status err(
- llvm::sys::fs::create_directory(module_cache_folder.GetPath()));
- if (err.Fail())
- return err;
- err = GetFile(platform_file, module_cache_spec);
- if (err.Fail())
- return err;
- if (FileSystem::Instance().Exists(module_cache_spec)) {
- local_file = module_cache_spec;
- return Status();
- } else
- return Status("unable to obtain valid module file");
- }
- }
- local_file = platform_file;
- return Status();
-}
-
llvm::StringRef PlatformRemoteMacOSX::GetDescriptionStatic() {
return "Remote Mac OS X user platform plug-in.";
}
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteMacOSX.h b/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteMacOSX.h
index d84b5c03c5873..17ae372e3616b 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteMacOSX.h
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteMacOSX.h
@@ -41,9 +41,6 @@ class PlatformRemoteMacOSX : public virtual PlatformRemoteDarwinDevice {
llvm::StringRef GetDescription() override { return GetDescriptionStatic(); }
- Status GetFileWithUUID(const FileSpec &platform_file, const UUID *uuid_ptr,
- FileSpec &local_file) override;
-
std::vector<ArchSpec>
GetSupportedArchitectures(const ArchSpec &process_host_arch) override;
More information about the lldb-commits
mailing list