diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2024-01-17 09:47:08 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-17 09:47:08 -0800 |
commit | 3b6a8f823bf873aa74cdb738f517e7333e20de7a (patch) | |
tree | 03869a6828de00d79e4229a0aa6907c19291967f /lldb/unittests | |
parent | d525e2b31b999fb2c989fb0986332066466c61c7 (diff) | |
download | llvm-3b6a8f823bf873aa74cdb738f517e7333e20de7a.zip llvm-3b6a8f823bf873aa74cdb738f517e7333e20de7a.tar.gz llvm-3b6a8f823bf873aa74cdb738f517e7333e20de7a.tar.bz2 |
[lldb] Upstream xros support in lldb (#78389)
Upstream support for debugging xros applications through LLDB.
Diffstat (limited to 'lldb/unittests')
-rw-r--r-- | lldb/unittests/Utility/XcodeSDKTest.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lldb/unittests/Utility/XcodeSDKTest.cpp b/lldb/unittests/Utility/XcodeSDKTest.cpp index 88371a4..8bf7ee1 100644 --- a/lldb/unittests/Utility/XcodeSDKTest.cpp +++ b/lldb/unittests/Utility/XcodeSDKTest.cpp @@ -27,6 +27,8 @@ 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("XRSimulator.sdk").GetType(), XcodeSDK::XRSimulator); + EXPECT_EQ(XcodeSDK("XROS.sdk").GetType(), XcodeSDK::XROS); EXPECT_EQ(XcodeSDK("Linux.sdk").GetType(), XcodeSDK::Linux); EXPECT_EQ(XcodeSDK("MacOSX.sdk").GetVersion(), llvm::VersionTuple()); EXPECT_EQ(XcodeSDK("MacOSX10.9.sdk").GetVersion(), llvm::VersionTuple(10, 9)); @@ -127,6 +129,14 @@ TEST(XcodeSDKTest, GetCanonicalNameAndConstruct) { EXPECT_EQ("watchos", XcodeSDK::GetCanonicalName(info)); EXPECT_EQ(XcodeSDK(info).Parse(), info); + info.type = XcodeSDK::Type::XRSimulator; + EXPECT_EQ("xrsimulator", XcodeSDK::GetCanonicalName(info)); + EXPECT_EQ(XcodeSDK(info).Parse(), info); + + info.type = XcodeSDK::Type::XROS; + EXPECT_EQ("xros", XcodeSDK::GetCanonicalName(info)); + EXPECT_EQ(XcodeSDK(info).Parse(), info); + info.type = XcodeSDK::Type::Linux; EXPECT_EQ("linux", XcodeSDK::GetCanonicalName(info)); EXPECT_EQ(XcodeSDK(info).Parse(), info); @@ -164,6 +174,13 @@ TEST(XcodeSDKTest, GetCanonicalNameAndConstruct) { EXPECT_EQ("watchos.internal", XcodeSDK::GetCanonicalName(info)); EXPECT_EQ(XcodeSDK(info).Parse(), info); + info.type = XcodeSDK::Type::XRSimulator; + EXPECT_EQ("xrsimulator.internal", XcodeSDK::GetCanonicalName(info)); + EXPECT_EQ(XcodeSDK(info).Parse(), info); + + info.type = XcodeSDK::Type::XROS; + EXPECT_EQ("xros.internal", XcodeSDK::GetCanonicalName(info)); + EXPECT_EQ(XcodeSDK(info).Parse(), info); info.type = XcodeSDK::Type::MacOSX; info.version = llvm::VersionTuple(10, 9); EXPECT_EQ("macosx10.9.internal", XcodeSDK::GetCanonicalName(info)); @@ -199,6 +216,11 @@ TEST(XcodeSDKTest, GetSDKTypeForTriple) { XcodeSDK::Type::WatchSimulator); EXPECT_EQ(XcodeSDK::GetSDKTypeForTriple(llvm::Triple("arm64-apple-watchos")), XcodeSDK::Type::watchOS); + EXPECT_EQ(XcodeSDK::GetSDKTypeForTriple( + llvm::Triple("arm64e-apple-xros-simulator")), + XcodeSDK::Type::XRSimulator); + EXPECT_EQ(XcodeSDK::GetSDKTypeForTriple(llvm::Triple("arm64e-apple-xros")), + XcodeSDK::Type::XROS); EXPECT_EQ(XcodeSDK::GetSDKTypeForTriple(llvm::Triple("x86_64-unknown-linux")), XcodeSDK::Type::Linux); EXPECT_EQ(XcodeSDK::GetSDKTypeForTriple(llvm::Triple("i386-unknown-netbsd")), |