Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions lldb/include/lldb/Utility/XcodeSDK.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ class XcodeSDK {
Type GetType() const;
llvm::StringRef GetString() const;
const FileSpec &GetSysroot() const;
/// Whether this Xcode SDK supports Swift.
bool SupportsSwift() const;

/// Whether LLDB feels confident importing Clang modules from this SDK.
static bool SDKSupportsModules(Type type, llvm::VersionTuple version);
Expand Down
23 changes: 0 additions & 23 deletions lldb/source/Utility/XcodeSDK.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,29 +243,6 @@ bool XcodeSDK::SDKSupportsModules(XcodeSDK::Type sdk_type,
return false;
}

bool XcodeSDK::SupportsSwift() const {
XcodeSDK::Info info = Parse();
switch (info.type) {
case Type::MacOSX:
return info.version.empty() || info.version >= llvm::VersionTuple(10, 10);
case Type::iPhoneOS:
case Type::iPhoneSimulator:
return info.version.empty() || info.version >= llvm::VersionTuple(8);
case Type::AppleTVSimulator:
case Type::AppleTVOS:
return info.version.empty() || info.version >= llvm::VersionTuple(9);
case Type::WatchSimulator:
case Type::watchOS:
return info.version.empty() || info.version >= llvm::VersionTuple(2);
case Type::XROS:
case Type::XRSimulator:
case Type::Linux:
return true;
default:
return false;
}
}

bool XcodeSDK::SDKSupportsModules(XcodeSDK::Type desired_type,
const FileSpec &sdk_path) {
ConstString last_path_component = sdk_path.GetFilename();
Expand Down
11 changes: 0 additions & 11 deletions lldb/unittests/Utility/XcodeSDKTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,17 +102,6 @@ TEST(XcodeSDKTest, SDKSupportsModules) {
}
#endif

TEST(XcodeSDKTest, SDKSupportsSwift) {
EXPECT_TRUE(XcodeSDK("iPhoneSimulator12.0.sdk").SupportsSwift());
EXPECT_TRUE(XcodeSDK("iPhoneSimulator12.0.Internal.sdk").SupportsSwift());
EXPECT_FALSE(XcodeSDK("iPhoneSimulator7.2.sdk").SupportsSwift());
EXPECT_TRUE(XcodeSDK("MacOSX10.10.sdk").SupportsSwift());
EXPECT_FALSE(XcodeSDK("MacOSX10.9.sdk").SupportsSwift());
EXPECT_TRUE(XcodeSDK("Linux.sdk").SupportsSwift());
EXPECT_TRUE(XcodeSDK("MacOSX.sdk").SupportsSwift());
EXPECT_FALSE(XcodeSDK("EverythingElse.sdk").SupportsSwift());
}

TEST(XcodeSDKTest, GetCanonicalNameAndConstruct) {
XcodeSDK::Info info;
info.type = XcodeSDK::Type::MacOSX;
Expand Down
Loading