Skip to content

Commit 86c9a7b

Browse files
authored
[lldb] Remove unused XcodeSDK::SupportsSwift (NFC) (#154572)
1 parent 035dd1d commit 86c9a7b

File tree

3 files changed

+0
-36
lines changed

3 files changed

+0
-36
lines changed

lldb/include/lldb/Utility/XcodeSDK.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,6 @@ class XcodeSDK {
8686
Type GetType() const;
8787
llvm::StringRef GetString() const;
8888
const FileSpec &GetSysroot() const;
89-
/// Whether this Xcode SDK supports Swift.
90-
bool SupportsSwift() const;
9189

9290
/// Whether LLDB feels confident importing Clang modules from this SDK.
9391
static bool SDKSupportsModules(Type type, llvm::VersionTuple version);

lldb/source/Utility/XcodeSDK.cpp

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -243,29 +243,6 @@ bool XcodeSDK::SDKSupportsModules(XcodeSDK::Type sdk_type,
243243
return false;
244244
}
245245

246-
bool XcodeSDK::SupportsSwift() const {
247-
XcodeSDK::Info info = Parse();
248-
switch (info.type) {
249-
case Type::MacOSX:
250-
return info.version.empty() || info.version >= llvm::VersionTuple(10, 10);
251-
case Type::iPhoneOS:
252-
case Type::iPhoneSimulator:
253-
return info.version.empty() || info.version >= llvm::VersionTuple(8);
254-
case Type::AppleTVSimulator:
255-
case Type::AppleTVOS:
256-
return info.version.empty() || info.version >= llvm::VersionTuple(9);
257-
case Type::WatchSimulator:
258-
case Type::watchOS:
259-
return info.version.empty() || info.version >= llvm::VersionTuple(2);
260-
case Type::XROS:
261-
case Type::XRSimulator:
262-
case Type::Linux:
263-
return true;
264-
default:
265-
return false;
266-
}
267-
}
268-
269246
bool XcodeSDK::SDKSupportsModules(XcodeSDK::Type desired_type,
270247
const FileSpec &sdk_path) {
271248
ConstString last_path_component = sdk_path.GetFilename();

lldb/unittests/Utility/XcodeSDKTest.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -102,17 +102,6 @@ TEST(XcodeSDKTest, SDKSupportsModules) {
102102
}
103103
#endif
104104

105-
TEST(XcodeSDKTest, SDKSupportsSwift) {
106-
EXPECT_TRUE(XcodeSDK("iPhoneSimulator12.0.sdk").SupportsSwift());
107-
EXPECT_TRUE(XcodeSDK("iPhoneSimulator12.0.Internal.sdk").SupportsSwift());
108-
EXPECT_FALSE(XcodeSDK("iPhoneSimulator7.2.sdk").SupportsSwift());
109-
EXPECT_TRUE(XcodeSDK("MacOSX10.10.sdk").SupportsSwift());
110-
EXPECT_FALSE(XcodeSDK("MacOSX10.9.sdk").SupportsSwift());
111-
EXPECT_TRUE(XcodeSDK("Linux.sdk").SupportsSwift());
112-
EXPECT_TRUE(XcodeSDK("MacOSX.sdk").SupportsSwift());
113-
EXPECT_FALSE(XcodeSDK("EverythingElse.sdk").SupportsSwift());
114-
}
115-
116105
TEST(XcodeSDKTest, GetCanonicalNameAndConstruct) {
117106
XcodeSDK::Info info;
118107
info.type = XcodeSDK::Type::MacOSX;

0 commit comments

Comments
 (0)