[PATCH] D45438: [CodeView] Enable debugging of captured variables within C++ lambdas

Brock Wyma via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 24 05:54:48 PDT 2018


bwyma updated this revision to Diff 143719.
bwyma added a comment.

I updated the patch file to generalize the fix for more than just lambdas.

> I think we want to ask the question "does this class have any non-trivial methods" here, and if so, emit an identifier for codeview.

I believe this is also insufficient because data member pointers also contain a class id referring to the forward reference.  For example:

  struct { int bar; } two = { 42 };
  int decltype(two)::*ptr2unnamed = &decltype(two)::bar;

I added this example and Reid's example into the test case included with my patch.


https://reviews.llvm.org/D45438

Files:
  llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp
  llvm/tools/clang/test/CodeGenCXX/debug-info-codeview-unnamed.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45438.143719.patch
Type: text/x-patch
Size: 6012 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180424/b71f07e4/attachment.bin>


More information about the llvm-commits mailing list