[PATCH] D37311: [DebugInfo] Lower dbg.declare to DBG_VALUE with DW_OP_deref

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 31 09:24:17 PDT 2017


aprantl added a comment.

Okay, thanks for the explanation. In order to make this change our highest priority should be that the contract between Clang and LLVM still works.
Secondarily, we should make an effort to ensure that LLVM IR testcases that include source code actually reflect the contract and can be reproduced by recompiling the original source with clang. If the IR changes after a patch, it may make sense to clone the test so we get both coverage of the original codepath in the backend and coverage/documentation of how frontends are expected to behave.

The contract still works if the same source code compiled with a patched clang produces the same DWARF/codeview as an unmodified clang. The debuginfo-tests are a good indicator that we're heading in the right direction. Or in other words, every time I changed the code relating to indirectness I broke one of those tests on my first attempt :-)


https://reviews.llvm.org/D37311





More information about the llvm-commits mailing list