[Lldb-commits] [PATCH] D79364: Move the Xcode SDK path caching to HostInfo
Adrian Prantl via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue May 5 11:53:10 PDT 2020
aprantl updated this revision to Diff 262184.
aprantl added a comment.
Removed the Platform detour.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79364/new/
https://reviews.llvm.org/D79364
Files:
lldb/include/lldb/Target/Platform.h
lldb/source/Core/Module.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.h
Index: lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.h
===================================================================
--- lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.h
+++ lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.h
@@ -89,8 +89,6 @@
llvm::Expected<lldb_private::StructuredData::DictionarySP>
FetchExtendedCrashInformation(lldb_private::Process &process) override;
- llvm::StringRef GetSDKPath(lldb_private::XcodeSDK sdk) override;
-
static lldb_private::FileSpec GetXcodeContentsDirectory();
static lldb_private::FileSpec GetXcodeDeveloperDirectory();
Index: lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
===================================================================
--- lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
+++ lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
@@ -1761,10 +1761,6 @@
return {};
}
-llvm::StringRef PlatformDarwin::GetSDKPath(XcodeSDK sdk) {
- return HostInfo::GetXcodeSDKPath(sdk);
-}
-
FileSpec PlatformDarwin::GetXcodeContentsDirectory() {
static FileSpec g_xcode_contents_path;
static std::once_flag g_once_flag;
Index: lldb/source/Core/Module.cpp
===================================================================
--- lldb/source/Core/Module.cpp
+++ lldb/source/Core/Module.cpp
@@ -18,6 +18,7 @@
#include "lldb/Core/Section.h"
#include "lldb/Host/FileSystem.h"
#include "lldb/Host/Host.h"
+#include "lldb/Host/HostInfo.h"
#include "lldb/Interpreter/CommandInterpreter.h"
#include "lldb/Interpreter/ScriptInterpreter.h"
#include "lldb/Symbol/CompileUnit.h"
@@ -33,7 +34,6 @@
#include "lldb/Symbol/TypeMap.h"
#include "lldb/Symbol/TypeSystem.h"
#include "lldb/Target/Language.h"
-#include "lldb/Target/Platform.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/Target.h"
#include "lldb/Utility/DataBufferHeap.h"
@@ -1598,10 +1598,10 @@
void Module::RegisterXcodeSDK(llvm::StringRef sdk_name, llvm::StringRef sysroot) {
XcodeSDK sdk(sdk_name.str());
- ConstString sdk_path(Platform::GetHostPlatform()->GetSDKPath(sdk));
+ ConstString sdk_path(HostInfo::GetXcodeSDKPath(sdk));
if (!sdk_path)
return;
- // If merged SDK changed for a previously registered source path, update it.
+ // If the SDK changed for a previously registered source path, update it.
// This could happend with -fdebug-prefix-map, otherwise it's unlikely.
ConstString sysroot_cs(sysroot);
if (!m_source_mappings.Replace(sysroot_cs, sdk_path, true))
Index: lldb/include/lldb/Target/Platform.h
===================================================================
--- lldb/include/lldb/Target/Platform.h
+++ lldb/include/lldb/Target/Platform.h
@@ -26,7 +26,6 @@
#include "lldb/Utility/StructuredData.h"
#include "lldb/Utility/Timeout.h"
#include "lldb/Utility/UserIDResolver.h"
-#include "lldb/Utility/XcodeSDK.h"
#include "lldb/lldb-private-forward.h"
#include "lldb/lldb-public.h"
#include "llvm/Support/VersionTuple.h"
@@ -435,8 +434,6 @@
return lldb_private::ConstString();
}
- virtual llvm::StringRef GetSDKPath(lldb_private::XcodeSDK sdk) { return {}; }
-
const std::string &GetRemoteURL() const { return m_remote_url; }
bool IsHost() const {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79364.262184.patch
Type: text/x-patch
Size: 3201 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200505/6f77df71/attachment.bin>
More information about the lldb-commits
mailing list