hanchenye-llvm-project/lldb/unittests/Expression
Adrian Prantl 9b23df63ec Implement DW_OP_convert
This patch adds basic support for DW_OP_convert[1] for integer
types. Recent versions of LLVM's optimizer may insert this opcode into
DWARF expressions. DW_OP_convert is effectively a type cast operation
that takes a reference to a base type DIE (or zero) and then casts the
value at the top of the DWARF stack to that type. Internally this
works by changing the bit size of the APInt that is used as backing
storage for LLDB's DWARF stack.

I managed to write a unit test for this by implementing a mock YAML
object file / module that takes debug info sections in yaml2obj
format.

[1] Typed DWARF stack. http://www.dwarfstd.org/ShowIssue.php?issue=140425.1

<rdar://problem/48167864>

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

llvm-svn: 371532
2019-09-10 16:17:38 +00:00
..
CMakeLists.txt [lldb][NFC] Add unit test for lldb_private::DiagnosticManager 2019-08-12 13:31:45 +00:00
ClangParserTest.cpp [ExpressionParser] Add swift-lldb case for finding clang resource dir 2019-03-26 21:00:42 +00:00
DWARFExpressionTest.cpp Implement DW_OP_convert 2019-09-10 16:17:38 +00:00
DiagnosticManagerTest.cpp [lldb][NFC] Add unit test for lldb_private::DiagnosticManager 2019-08-12 13:31:45 +00:00