[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 May 8 05:53:48 PDT 2018


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

> The indentation seems off which suggests the patch may contain tabs.

Fixed.

> This boolean condition is complicated. Can you find a way to break it up and add comments ...

Fixed.

> However, doesn't this conflict with the goal of https://reviews.llvm.org/D32498?

This patch fixes the identifier emission for C++ types.  Patch https://reviews.llvm.org/D32498 is for C types.

> My final concern is that the C++ mangled names we generate in this case are not necessarily unique ...

Your point is correct, the identifier could be more robust.  But this patch still improves cases which can't be debugged currently.

> We should have a test that in C mode, anonymous structs do not get identifiers.

I added a new test for your review.

> Maybe "Non-externally visible named structures do not ..." to be specific.

Fixed.

> I would expect the debugger to require a forward reference for these methods and data members ...

You are correct, and your suggestion matches what Visual Studio produces.  I fixed the patch to match this behavior.


https://reviews.llvm.org/D45438

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45438.145673.patch
Type: text/x-patch
Size: 7898 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180508/0fcbb24e/attachment.bin>


More information about the llvm-commits mailing list