Skip to content

Commit 3e251e7

Browse files
authored
[lldb] Correct bridgeOS -> BridgeOS spelling (#163479)
The BridgeOS SDK is capitalized, but previously failed to parse because we were looking for bridgeOS. This PR updates the enum value and the canonical spelling. rdar://162641896
1 parent 6574a2e commit 3e251e7

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

lldb/include/lldb/Utility/XcodeSDK.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class XcodeSDK {
3838
watchOS,
3939
XRSimulator,
4040
XROS,
41-
bridgeOS,
41+
BridgeOS,
4242
Linux,
4343
unknown = -1
4444
};

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1150,7 +1150,7 @@ void PlatformDarwin::AddClangModuleCompilationOptionsForSDKType(
11501150
case XcodeSDK::Type::XRSimulator:
11511151
case XcodeSDK::Type::XROS:
11521152
// FIXME: Pass the right argument once it exists.
1153-
case XcodeSDK::Type::bridgeOS:
1153+
case XcodeSDK::Type::BridgeOS:
11541154
case XcodeSDK::Type::Linux:
11551155
case XcodeSDK::Type::unknown:
11561156
if (Log *log = GetLog(LLDBLog::Host)) {

lldb/source/Utility/XcodeSDK.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ static llvm::StringRef GetName(XcodeSDK::Type type) {
3838
return "XRSimulator";
3939
case XcodeSDK::XROS:
4040
return "XROS";
41-
case XcodeSDK::bridgeOS:
42-
return "bridgeOS";
41+
case XcodeSDK::BridgeOS:
42+
return "BridgeOS";
4343
case XcodeSDK::Linux:
4444
return "Linux";
4545
case XcodeSDK::unknown:
@@ -83,8 +83,8 @@ static XcodeSDK::Type ParseSDKName(llvm::StringRef &name) {
8383
return XcodeSDK::XRSimulator;
8484
if (name.consume_front("XROS"))
8585
return XcodeSDK::XROS;
86-
if (name.consume_front("bridgeOS"))
87-
return XcodeSDK::bridgeOS;
86+
if (name.consume_front("BridgeOS"))
87+
return XcodeSDK::BridgeOS;
8888
if (name.consume_front("Linux"))
8989
return XcodeSDK::Linux;
9090
static_assert(XcodeSDK::Linux == XcodeSDK::numSDKTypes - 1,
@@ -204,7 +204,7 @@ std::string XcodeSDK::GetCanonicalName(XcodeSDK::Info info) {
204204
case XROS:
205205
name = "xros";
206206
break;
207-
case bridgeOS:
207+
case BridgeOS:
208208
name = "bridgeos";
209209
break;
210210
case Linux:

lldb/unittests/Utility/XcodeSDKTest.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ TEST(XcodeSDKTest, ParseTest) {
2727
EXPECT_EQ(XcodeSDK("AppleTVOS.sdk").GetType(), XcodeSDK::AppleTVOS);
2828
EXPECT_EQ(XcodeSDK("WatchSimulator.sdk").GetType(), XcodeSDK::WatchSimulator);
2929
EXPECT_EQ(XcodeSDK("WatchOS.sdk").GetType(), XcodeSDK::watchOS);
30+
EXPECT_EQ(XcodeSDK("BridgeOS.sdk").GetType(), XcodeSDK::BridgeOS);
3031
EXPECT_EQ(XcodeSDK("XRSimulator.sdk").GetType(), XcodeSDK::XRSimulator);
3132
EXPECT_EQ(XcodeSDK("XROS.sdk").GetType(), XcodeSDK::XROS);
3233
EXPECT_EQ(XcodeSDK("Linux.sdk").GetType(), XcodeSDK::Linux);

0 commit comments

Comments
 (0)