Removed the == and != operators from ArchSpec, since
equality can be strict or loose and we want code to
explicitly choose one or the other.

Also renamed the Compare function to IsEqualTo, to
avoid confusion.

<rdar://problem/12856749>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@170152 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Target/Platform.cpp b/source/Target/Platform.cpp
index 86ef2a0..22fb997 100644
--- a/source/Target/Platform.cpp
+++ b/source/Target/Platform.cpp
@@ -688,7 +688,7 @@
         ArchSpec platform_arch;
         for (uint32_t arch_idx=0; GetSupportedArchitectureAtIndex (arch_idx, platform_arch); ++arch_idx)
         {
-            if (arch == platform_arch)
+            if (arch.IsCompatibleMatch(platform_arch))
             {
                 if (compatible_arch_ptr)
                     *compatible_arch_ptr = platform_arch;
diff --git a/source/Target/Process.cpp b/source/Target/Process.cpp
index 7ed4cb0..5394923 100644
--- a/source/Target/Process.cpp
+++ b/source/Target/Process.cpp
@@ -831,7 +831,7 @@
         return false;
     
     if (m_match_info.GetArchitecture().IsValid() && 
-        m_match_info.GetArchitecture() != proc_info.GetArchitecture())
+        !m_match_info.GetArchitecture().IsCompatibleMatch(proc_info.GetArchitecture()))
         return false;
     return true;
 }
@@ -2971,7 +2971,7 @@
             ProcessInstanceInfo process_info;
             platform_sp->GetProcessInfo (GetID(), process_info);
             const ArchSpec &process_arch = process_info.GetArchitecture();
-            if (process_arch.IsValid() && m_target.GetArchitecture() != process_arch)
+            if (process_arch.IsValid() && !m_target.GetArchitecture().IsExactMatch(process_arch))
                 m_target.SetArchitecture (process_arch);
         }
     }
diff --git a/source/Target/Target.cpp b/source/Target/Target.cpp
index 888545a..e373efe 100644
--- a/source/Target/Target.cpp
+++ b/source/Target/Target.cpp
@@ -1054,7 +1054,7 @@
 Target::SetArchitecture (const ArchSpec &arch_spec)
 {
     LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TARGET));
-    if (m_arch == arch_spec || !m_arch.IsValid())
+    if (m_arch.IsCompatibleMatch(arch_spec) || !m_arch.IsValid())
     {
         // If we haven't got a valid arch spec, or the architectures are
         // compatible, so just update the architecture. Architectures can be
diff --git a/source/Target/TargetList.cpp b/source/Target/TargetList.cpp
index ff9e855..c67b42f 100644
--- a/source/Target/TargetList.cpp
+++ b/source/Target/TargetList.cpp
@@ -301,7 +301,7 @@
             {
                 if (exe_arch_ptr)
                 {
-                    if (*exe_arch_ptr != exe_module->GetArchitecture())
+                    if (!exe_arch_ptr->IsCompatibleMatch(exe_module->GetArchitecture()))
                         continue;
                 }
                 target_sp = *pos;