Mark armv6m compat with armv7em; match armv7em being compat with armv6m
authorJason Molenda <jason@molenda.com>
Thu, 15 Apr 2021 08:28:58 +0000 (01:28 -0700)
committerJason Molenda <jason@molenda.com>
Thu, 15 Apr 2021 08:30:51 +0000 (01:30 -0700)
armv7em and armv6m in ArchSpec cores_match() will return true.
There was a small bug where the reverse order would not return true.

rdar://76387176

lldb/source/Utility/ArchSpec.cpp

index 52fbf35..90c1bbb 100644 (file)
@@ -1122,11 +1122,13 @@ static bool cores_match(const ArchSpec::Core core1, const ArchSpec::Core core2,
     if (!enforce_exact_match) {
       if (core2 == ArchSpec::eCore_arm_generic)
         return true;
-      try_inverse = false;
+      if (core2 == ArchSpec::eCore_arm_armv7em)
+        return true;
       if (core2 == ArchSpec::eCore_arm_armv7)
         return true;
       if (core2 == ArchSpec::eCore_arm_armv6m)
         return true;
+      try_inverse = false;
     }
     break;