Reland "[LLDB] [LoongArch] Add loongarch64 case in ComputeHostArchitectureSupport()"
authorTiezhu Yang <yangtiezhu@loongson.cn>
Fri, 4 Nov 2022 02:39:57 +0000 (10:39 +0800)
committerWeining Lu <luweining@loongson.cn>
Fri, 4 Nov 2022 02:40:53 +0000 (10:40 +0800)
This is a simple change, loongarch64 host also supports 32-bit binaries,
so note it.

Without this patch:

```
[loongson@linux build]$ ./tools/lldb/unittests/Host/HostTests | tail -6
[==========] 78 tests from 18 test suites ran. (16 ms total)
[  PASSED  ] 77 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] HostTest.GetProcessInfo

 1 FAILED TEST
```

With this patch:

```
[loongson@linux build]$ ./tools/lldb/unittests/Host/HostTests | tail -2
[==========] 78 tests from 18 test suites ran. (15 ms total)
[  PASSED  ] 78 tests.
```

Reviewed By: SixWeining, xen0n, MaskRay, DavidSpickett

Differential Revision: https://reviews.llvm.org/D137312

lldb/source/Host/common/HostInfoBase.cpp

index e808834..9a7b77c 100644 (file)
@@ -340,6 +340,7 @@ void HostInfoBase::ComputeHostArchitectureSupport(ArchSpec &arch_32,
   case llvm::Triple::ppc64le:
   case llvm::Triple::x86_64:
   case llvm::Triple::riscv64:
+  case llvm::Triple::loongarch64:
     arch_64.SetTriple(triple);
     arch_32.SetTriple(triple.get32BitArchVariant());
     break;