[PATCH] D56587: Fix sign/zero extension in Dwarf expressions.

Markus Lavin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 4 05:44:43 PST 2019


markus added a comment.

> the type reference should be a metadata operand. Otherwise you'll need to implement support in llvm-link etc, too.
>  I would just implement the type reference as normal metadata operands in DIExpression and bake the knowledge that DW_OP_convert consumes one of the metadata operands into the DIExpression operand iterator.

That makes sense. I am working on that right now.

> On the other extreme, the only thing we really need from the basic types used by DW_OP_convert is the size and signedness. We could just encode that directly in the expression as DW_OP_LLVM_convert, 1, 32 for a signed int32_t or something like that. That doesn't solve the problem for how to determine which types we need to emit into the debug info, but it would be a very straightforward self-contained encoding up until AsmPrinter.

I'd much prefer a generic solution that makes it easy (at least wrt this) to use other typed DW5 ops as well down the road.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56587/new/

https://reviews.llvm.org/D56587





More information about the llvm-commits mailing list