[Lldb-commits] [PATCH] D13578: Allow generic arm ArchSpec to merge with specific arm ArchSpec; allow Cortex M0-7's to always force thumb mode

Tamas Berghammer via lldb-commits lldb-commits at lists.llvm.org
Tue Oct 13 09:58:53 PDT 2015


tberghammer added inline comments.

================
Comment at: source/Core/ArchSpec.cpp:859-870
@@ -853,1 +858,14 @@
+
+    // If this and other are both arm ArchSpecs and this ArchSpec is a generic "some kind of arm"
+    // spec but the other ArchSpec is a specific arm core, adopt the specific arm core.
+    if (GetTriple().getArch() == llvm::Triple::arm
+        && other.GetTriple().getArch() == llvm::Triple::arm
+        && IsCompatibleMatch (other)
+        && GetCore() == ArchSpec::eCore_arm_generic
+        && other.GetCore() != ArchSpec::eCore_arm_generic)
+    {
+        m_core = other.GetCore();
+        CoreUpdated (true);
+    }
+
     if (GetTriple().getEnvironment() == llvm::Triple::UnknownEnvironment)
----------------
I would like to see this part of the code to be replaced with something like this so we store the sub-architecture inside the triple and we don't have to special case arm (it is already done in llvm::Triple):

```
if (GetTriple().getSubArch() == llvm::Triple::NoSubArch)
    GetTriple().setSubArch(other.GetTriple().getSubArch());
```


Repository:
  rL LLVM

http://reviews.llvm.org/D13578





More information about the lldb-commits mailing list