return lldb_private::ConstString();
}
- virtual std::string GetSDKPath(lldb_private::XcodeSDK sdk) {
- return {};
- }
+ virtual llvm::StringRef GetSDKPath(lldb_private::XcodeSDK sdk) { return {}; }
const std::string &GetRemoteURL() const { return m_remote_url; }
return {};
}
-std::string PlatformDarwin::GetSDKPath(XcodeSDK sdk) {
+llvm::StringRef PlatformDarwin::GetSDKPath(XcodeSDK sdk) {
std::lock_guard<std::mutex> guard(m_sdk_path_mutex);
std::string &path = m_sdk_path[sdk.GetString()];
- if (!path.empty())
- return path;
- return HostInfo::GetXcodeSDK(sdk);
+ if (path.empty())
+ path = HostInfo::GetXcodeSDK(sdk);
+ return path;
}
FileSpec PlatformDarwin::GetXcodeContentsDirectory() {
llvm::Expected<lldb_private::StructuredData::DictionarySP>
FetchExtendedCrashInformation(lldb_private::Process &process) override;
- std::string GetSDKPath(lldb_private::XcodeSDK sdk) override;
+ llvm::StringRef GetSDKPath(lldb_private::XcodeSDK sdk) override;
static lldb_private::FileSpec GetXcodeContentsDirectory();
static lldb_private::FileSpec GetXcodeDeveloperDirectory();