llvm-project/lldb/unittests
Emmmer d0dcbb9b02 [LLDB][RISCV][NFC] Rewrite instruction in algebraic datatype
The old approach (dedicated ExecXXX for each instruction) is not flexible and results in duplicated code when RVC kicks in.

According to the spec, every compressed instruction can be decoded to a non-compressed one. So we can lower compressed instructions to instructions we already had, which requires a decoupling between the decoder and executor.

This patch:
- use llvm::Optional and its combinators AMAP.
- use template constraints on common instruction.
- make instructions strongly-typed (no uint32_t everywhere bc it is error-prone and burdens the developer when lowering the RVC) with the help of algebraic datatype (std::variant).

Note:
(NFC) because this is more of a refactoring in preparation for RVC.

Reviewed By: DavidSpickett

Differential Revision: https://reviews.llvm.org/D135015
2022-10-05 19:45:28 +08:00
..
API [LLDB] Applying clang-tidy modernize-use-override over LLDB 2022-04-22 13:29:47 -07:00
Breakpoint
Core [lldb] Remove LLDB reproducers 2022-09-19 14:43:31 -07:00
DataFormatter [nfc] [lldb] Prevent needless copies of DataExtractor 2021-08-04 20:35:53 +02:00
Disassembler Move GetControlFlowKind's logic to DisassemblerLLVMC.cpp 2022-07-26 12:05:23 -07:00
Editline Re-land "[lldb] Synchronize output through the IOHandler" 2022-03-15 12:53:46 -07:00
Expression [lldb] Remove LLDB reproducers 2022-09-19 14:43:31 -07:00
Host [lldb] Go back to process-directed signals in MainLoopTest.cpp 2022-09-06 14:00:53 +02:00
Instruction [LLDB][RISCV][NFC] Rewrite instruction in algebraic datatype 2022-10-05 19:45:28 +08:00
Interpreter [lldb] Remove LLDB reproducers 2022-09-19 14:43:31 -07:00
Language [lldb][unittests] Add more test cases to CPlusPlusNameParser unit-tests 2022-08-11 15:05:48 +01:00
ObjectFile Change the meaning of a UUID with all zeros for data. 2022-08-30 10:17:58 -07:00
Platform [lldb] Remove LLDB reproducers 2022-09-19 14:43:31 -07:00
Process [lldb] Remove LLDB reproducers 2022-09-19 14:43:31 -07:00
ScriptInterpreter [lldb] Remove LLDB reproducers 2022-09-19 14:43:31 -07:00
Signals Store a by name list of signals with their actions in the Target 2022-05-26 14:50:33 -07:00
Symbol Speculatively fix the lldb build 2022-09-28 13:39:48 -04:00
SymbolFile Change the meaning of a UUID with all zeros for data. 2022-08-30 10:17:58 -07:00
Target [lldb] Remove LLDB reproducers 2022-09-19 14:43:31 -07:00
TestingSupport Fix DW_OP_convert to resolve the CU relative offset correctly. 2022-09-12 16:53:19 -07:00
Thread [lldb] Remove LLDB reproducers 2022-09-19 14:43:31 -07:00
UnwindAssembly Update the CFA to use $sp when $fp is restored on arm64 2022-05-04 14:54:17 -07:00
Utility Include <cmath> before using std::pow() 2022-09-28 17:35:35 -07:00
debugserver [lldb] [unittests] Fix TcpListen() call in RNBSocketTest 2021-10-26 21:08:03 +02:00
tools [test] Use either `127.0.0.1` or `[::1]` to run in ipv6-only environments. 2022-09-09 14:00:35 -07:00
CMakeLists.txt lldb: Disable unittests if llvm_gtest target does not exist 2022-08-10 16:56:08 -07:00
gtest_common.h