[PATCH] D31439: PR32382: Emit complex DWARF expressions with the correct location description kind

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 6 11:24:39 PDT 2017


aprantl planned changes to this revision.
aprantl added a comment.

Thanks a lot for reviewing this, David! While I was preparing the next updated of the corresponding clang changes in https://reviews.llvm.org/D31440 I realized that there is one use-case that is not supported by this variant. To encode locations for by-ref captures clang wants to describe a location that is at an offset inside of a larger alloca. To support this use-case I need to remove the implicit DW_OP_deref that we are adding to dbg.declares everywhere and make it explicit instead.
This will be a good change:

- it will make a future patch that replaces all instances of dbg.declare with dbg.value very simple
- we won't need to rewrite DIExpressions when we lower dbg.declare -> dbg.value
- it will make the DW_OP_xderef use-case that I complain about in DwarfCompileUnit.cpp:570 appear less out-of-place.

I'll be back here with an updated (albeit somewhat longer) patch soon. Meanwhile I'm also extending the debuginfo-tests a bit to make sure I'm not breaking the integration between llvm and clang.


https://reviews.llvm.org/D31439





More information about the llvm-commits mailing list