Skip to content

Commit a1cda48

Browse files
author
git apple-llvm automerger
committed
Merge commit '60a355db7da1' from apple/stable/20200108 into swift/release/5.3
2 parents 8d1514b + 60a355d commit a1cda48

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

lldb/include/lldb/Target/Platform.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -432,9 +432,7 @@ class Platform : public PluginInterface {
432432
return lldb_private::ConstString();
433433
}
434434

435-
virtual std::string GetSDKPath(lldb_private::XcodeSDK sdk) {
436-
return {};
437-
}
435+
virtual llvm::StringRef GetSDKPath(lldb_private::XcodeSDK sdk) { return {}; }
438436

439437
const std::string &GetRemoteURL() const { return m_remote_url; }
440438

lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1761,12 +1761,12 @@ PlatformDarwin::FindXcodeContentsDirectoryInPath(llvm::StringRef path) {
17611761
return {};
17621762
}
17631763

1764-
std::string PlatformDarwin::GetSDKPath(XcodeSDK sdk) {
1764+
llvm::StringRef PlatformDarwin::GetSDKPath(XcodeSDK sdk) {
17651765
std::lock_guard<std::mutex> guard(m_sdk_path_mutex);
17661766
std::string &path = m_sdk_path[sdk.GetString()];
1767-
if (!path.empty())
1768-
return path;
1769-
return HostInfo::GetXcodeSDK(sdk);
1767+
if (path.empty())
1768+
path = HostInfo::GetXcodeSDK(sdk);
1769+
return path;
17701770
}
17711771

17721772
FileSpec PlatformDarwin::GetXcodeContentsDirectory() {

lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class PlatformDarwin : public PlatformPOSIX {
9090
llvm::Expected<lldb_private::StructuredData::DictionarySP>
9191
FetchExtendedCrashInformation(lldb_private::Process &process) override;
9292

93-
std::string GetSDKPath(lldb_private::XcodeSDK sdk) override;
93+
llvm::StringRef GetSDKPath(lldb_private::XcodeSDK sdk) override;
9494

9595
static lldb_private::FileSpec GetXcodeContentsDirectory();
9696
static lldb_private::FileSpec GetXcodeDeveloperDirectory();

0 commit comments

Comments
 (0)