Skip to content

Commit 43be968

Browse files
committed
[lldb] Add non-Apple implementation of GetSDKPathFromDebugInfo
`PlatformDarwin::GetSDKPathFromDebugInfo` is only available on Apple platforms, add an empty implementation of `GetSDKPathFromDebugInfo` to prevent linkage errors.
1 parent 9f60821 commit 43be968

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1937,7 +1937,9 @@ static std::string GetSDKPath(std::string m_description, XcodeSDK sdk) {
19371937
/// Force parsing of the CUs to extract the SDK info.
19381938
static std::string GetSDKPathFromDebugInfo(std::string m_description,
19391939
Module &module) {
1940-
1940+
#if !defined(__APPLE__)
1941+
return {};
1942+
#else
19411943
auto sdk_or_err = PlatformDarwin::GetSDKPathFromDebugInfo(module);
19421944
if (!sdk_or_err) {
19431945
Debugger::ReportError("Error while parsing SDK path from debug-info: " +
@@ -1954,6 +1956,7 @@ static std::string GetSDKPathFromDebugInfo(std::string m_description,
19541956
module.GetFileSpec().GetFilename().GetCString());
19551957

19561958
return GetSDKPath(m_description, std::move(sdk));
1959+
#endif
19571960
}
19581961

19591962
static std::vector<llvm::StringRef>

0 commit comments

Comments
 (0)