https://github.com/JDevlieghere updated https://github.com/llvm/llvm-project/pull/163479
>From 3c71552dc4837c41d1ffb1683e8544522ca78aad Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere <[email protected]> Date: Wed, 15 Oct 2025 11:20:17 -0700 Subject: [PATCH] [lldb] Correct bridgeOS -> BridgeOS spelling 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 --- lldb/include/lldb/Utility/XcodeSDK.h | 2 +- lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp | 2 +- lldb/source/Utility/XcodeSDK.cpp | 10 +++++----- lldb/unittests/Utility/XcodeSDKTest.cpp | 1 + 4 files changed, 8 insertions(+), 7 deletions(-) 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); _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
