[Lldb-commits] [lldb] 3e251e7 - [lldb] Correct bridgeOS -> BridgeOS spelling (#163479)
via lldb-commits
lldb-commits at lists.llvm.org
Wed Oct 15 15:15:24 PDT 2025
Author: Jonas Devlieghere
Date: 2025-10-15T15:15:20-07:00
New Revision: 3e251e727f6a214d11272c58db50b56544ee023d
URL: https://github.com/llvm/llvm-project/commit/3e251e727f6a214d11272c58db50b56544ee023d
DIFF: https://github.com/llvm/llvm-project/commit/3e251e727f6a214d11272c58db50b56544ee023d.diff
LOG: [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
Added:
Modified:
lldb/include/lldb/Utility/XcodeSDK.h
lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
lldb/source/Utility/XcodeSDK.cpp
lldb/unittests/Utility/XcodeSDKTest.cpp
Removed:
################################################################################
diff --git a/lldb/include/lldb/Utility/XcodeSDK.h b/lldb/include/lldb/Utility/XcodeSDK.h
index 5b345a4965cf9..5f89019537689 100644
--- a/lldb/include/lldb/Utility/XcodeSDK.h
+++ b/lldb/include/lldb/Utility/XcodeSDK.h
@@ -38,7 +38,7 @@ class XcodeSDK {
watchOS,
XRSimulator,
XROS,
- bridgeOS,
+ BridgeOS,
Linux,
unknown = -1
};
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
index cd72454fe0287..5aad4470091bc 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
@@ -1150,7 +1150,7 @@ void PlatformDarwin::AddClangModuleCompilationOptionsForSDKType(
case XcodeSDK::Type::XRSimulator:
case XcodeSDK::Type::XROS:
// FIXME: Pass the right argument once it exists.
- case XcodeSDK::Type::bridgeOS:
+ case XcodeSDK::Type::BridgeOS:
case XcodeSDK::Type::Linux:
case XcodeSDK::Type::unknown:
if (Log *log = GetLog(LLDBLog::Host)) {
diff --git a/lldb/source/Utility/XcodeSDK.cpp b/lldb/source/Utility/XcodeSDK.cpp
index 2040791882fd0..89e05de975835 100644
--- a/lldb/source/Utility/XcodeSDK.cpp
+++ b/lldb/source/Utility/XcodeSDK.cpp
@@ -38,8 +38,8 @@ static llvm::StringRef GetName(XcodeSDK::Type type) {
return "XRSimulator";
case XcodeSDK::XROS:
return "XROS";
- case XcodeSDK::bridgeOS:
- return "bridgeOS";
+ case XcodeSDK::BridgeOS:
+ return "BridgeOS";
case XcodeSDK::Linux:
return "Linux";
case XcodeSDK::unknown:
@@ -83,8 +83,8 @@ static XcodeSDK::Type ParseSDKName(llvm::StringRef &name) {
return XcodeSDK::XRSimulator;
if (name.consume_front("XROS"))
return XcodeSDK::XROS;
- if (name.consume_front("bridgeOS"))
- return XcodeSDK::bridgeOS;
+ if (name.consume_front("BridgeOS"))
+ return XcodeSDK::BridgeOS;
if (name.consume_front("Linux"))
return XcodeSDK::Linux;
static_assert(XcodeSDK::Linux == XcodeSDK::numSDKTypes - 1,
@@ -204,7 +204,7 @@ std::string XcodeSDK::GetCanonicalName(XcodeSDK::Info info) {
case XROS:
name = "xros";
break;
- case bridgeOS:
+ case BridgeOS:
name = "bridgeos";
break;
case Linux:
diff --git a/lldb/unittests/Utility/XcodeSDKTest.cpp b/lldb/unittests/Utility/XcodeSDKTest.cpp
index de9f91a04d53e..a8a597bdeb746 100644
--- a/lldb/unittests/Utility/XcodeSDKTest.cpp
+++ b/lldb/unittests/Utility/XcodeSDKTest.cpp
@@ -27,6 +27,7 @@ TEST(XcodeSDKTest, ParseTest) {
EXPECT_EQ(XcodeSDK("AppleTVOS.sdk").GetType(), XcodeSDK::AppleTVOS);
EXPECT_EQ(XcodeSDK("WatchSimulator.sdk").GetType(), XcodeSDK::WatchSimulator);
EXPECT_EQ(XcodeSDK("WatchOS.sdk").GetType(), XcodeSDK::watchOS);
+ EXPECT_EQ(XcodeSDK("BridgeOS.sdk").GetType(), XcodeSDK::BridgeOS);
EXPECT_EQ(XcodeSDK("XRSimulator.sdk").GetType(), XcodeSDK::XRSimulator);
EXPECT_EQ(XcodeSDK("XROS.sdk").GetType(), XcodeSDK::XROS);
EXPECT_EQ(XcodeSDK("Linux.sdk").GetType(), XcodeSDK::Linux);
More information about the lldb-commits
mailing list