[Lldb-commits] [PATCH] D84716: [lldb/ArchSpec] Always match simulator environment in IsEqualTo
Frederic Riss via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Jul 27 17:34:22 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG8120eba5fce3: [lldb/ArchSpec] Always match simulator environment in IsEqualTo (authored by friss).
Changed prior to commit:
https://reviews.llvm.org/D84716?vs=281084&id=281088#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84716/new/
https://reviews.llvm.org/D84716
Files:
lldb/source/Utility/ArchSpec.cpp
lldb/unittests/Utility/ArchSpecTest.cpp
Index: lldb/unittests/Utility/ArchSpecTest.cpp
===================================================================
--- lldb/unittests/Utility/ArchSpecTest.cpp
+++ lldb/unittests/Utility/ArchSpecTest.cpp
@@ -306,6 +306,14 @@
ASSERT_FALSE(A.IsExactMatch(B));
ASSERT_FALSE(A.IsCompatibleMatch(B));
}
+ {
+ ArchSpec A("arm64-apple-ios");
+ ArchSpec B("arm64-apple-ios-simulator");
+ ASSERT_FALSE(A.IsExactMatch(B));
+ ASSERT_FALSE(A.IsCompatibleMatch(B));
+ ASSERT_FALSE(B.IsCompatibleMatch(A));
+ ASSERT_FALSE(B.IsCompatibleMatch(A));
+ }
{
ArchSpec A("arm64-*-*");
ArchSpec B("arm64-apple-ios");
Index: lldb/source/Utility/ArchSpec.cpp
===================================================================
--- lldb/source/Utility/ArchSpec.cpp
+++ lldb/source/Utility/ArchSpec.cpp
@@ -987,6 +987,12 @@
if (lhs == rhs)
return true;
+ // Apple simulators are a different platform than what they simulate.
+ // As the environments are different at this point, if one of them is a
+ // simulator, then they are different.
+ if (lhs == llvm::Triple::Simulator || rhs == llvm::Triple::Simulator)
+ return false;
+
// If any of the environment is unknown then they are compatible
if (lhs == llvm::Triple::UnknownEnvironment ||
rhs == llvm::Triple::UnknownEnvironment)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84716.281088.patch
Type: text/x-patch
Size: 1332 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200728/94d45b21/attachment.bin>
More information about the lldb-commits
mailing list