[Lldb-commits] [lldb] de86508 - [LLDB] [LoongArch] Add loongarch64 case in ComputeHostArchitectureSupport()

Weining Lu via lldb-commits lldb-commits at lists.llvm.org
Thu Nov 3 19:28:45 PDT 2022


Author: Weining Lu
Date: 2022-11-04T10:26:31+08:00
New Revision: de865087f8c07c742dec3523ec8cbe6895bd57ac

URL: https://github.com/llvm/llvm-project/commit/de865087f8c07c742dec3523ec8cbe6895bd57ac
DIFF: https://github.com/llvm/llvm-project/commit/de865087f8c07c742dec3523ec8cbe6895bd57ac.diff

LOG: [LLDB] [LoongArch] Add loongarch64 case in ComputeHostArchitectureSupport()

This is a simple change, loongarch64 host also supports 32-bit binaries,
so note it.

Without this patch:

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

Reviewed By: xen0n, MaskRay, DavidSpickett

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

Added: 
    

Modified: 
    lldb/source/Host/common/HostInfoBase.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Host/common/HostInfoBase.cpp b/lldb/source/Host/common/HostInfoBase.cpp
index e8088344422a7..9a7b77c19de1d 100644
--- a/lldb/source/Host/common/HostInfoBase.cpp
+++ b/lldb/source/Host/common/HostInfoBase.cpp
@@ -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;


        


More information about the lldb-commits mailing list