[lldb] Remove unused PlatformRemoteDarwinDevice::FindFileInAllSDKs
authorJonas Devlieghere <jonas@devlieghere.com>
Mon, 2 May 2022 23:21:21 +0000 (16:21 -0700)
committerJonas Devlieghere <jonas@devlieghere.com>
Tue, 3 May 2022 00:34:39 +0000 (17:34 -0700)
As far as I can tell this function is unused both upstream and
downstream.

lldb/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.h

index be03cdb..83e98ff 100644 (file)
@@ -382,25 +382,6 @@ const char *PlatformRemoteDarwinDevice::GetDeviceSupportDirectoryForOSVersion()
   return nullptr;
 }
 
-uint32_t PlatformRemoteDarwinDevice::FindFileInAllSDKs(const char *platform_file_path,
-                                              FileSpecList &file_list) {
-  Log *log = GetLog(LLDBLog::Host);
-  if (platform_file_path && platform_file_path[0] &&
-      UpdateSDKDirectoryInfosIfNeeded()) {
-    const uint32_t num_sdk_infos = m_sdk_directory_infos.size();
-    lldb_private::FileSpec local_file;
-    // First try for an exact match of major, minor and update
-    for (uint32_t sdk_idx = 0; sdk_idx < num_sdk_infos; ++sdk_idx) {
-      LLDB_LOGV(log, "Searching for {0} in sdk path {1}", platform_file_path,
-                m_sdk_directory_infos[sdk_idx].directory);
-      if (GetFileInSDK(platform_file_path, sdk_idx, local_file)) {
-        file_list.Append(local_file);
-      }
-    }
-  }
-  return file_list.GetSize();
-}
-
 bool PlatformRemoteDarwinDevice::GetFileInSDK(const char *platform_file_path,
                                      uint32_t sdk_idx,
                                      lldb_private::FileSpec &local_file) {
index 02cb09d..6623a94 100644 (file)
@@ -97,15 +97,9 @@ protected:
                                                llvm::sys::fs::file_type ft,
                                                llvm::StringRef path);
 
-  uint32_t FindFileInAllSDKs(const char *platform_file_path,
-                             FileSpecList &file_list);
-
   bool GetFileInSDK(const char *platform_file_path, uint32_t sdk_idx,
                     FileSpec &local_file);
 
-  uint32_t FindFileInAllSDKs(const FileSpec &platform_file,
-                             FileSpecList &file_list);
-
   uint32_t GetConnectedSDKIndex();
 
   // Get index of SDK in SDKDirectoryInfoCollection by its pointer and return