[PATCH] D45438: [CodeView] Enable debugging of captured variables within C++ lambdas
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 10 10:34:29 PDT 2018
rnk requested changes to this revision.
rnk added a comment.
This revision now requires changes to proceed.
I don't think this is enough, this issue generalizes to more than just lambdas. The more general problem is this:
- C++ classes with methods create a cycle in the type hierarchy (class refers to method, method refers to class)
- Some C++ classes without names may not be externally visibible
- CodeView requires class identifiers to enable this circular reference.
Here is a program that will need identifiers that your patch misses:
void foo() {
struct {
void bar() {}
} obj;
obj.bar();
}
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.
https://reviews.llvm.org/D45438
More information about the llvm-commits
mailing list