[llvm] Supports viewing class member variables in lambda when using the vs debugger (PR #71564)

Zequan Wu via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 9 13:39:51 PST 2023


================
@@ -2605,6 +2605,9 @@ CodeViewDebug::lowerRecordFieldList(const DICompositeType *Ty) {
       MemberBaseType = TypeTable.writeLeafType(BFR);
     }
     uint64_t MemberOffsetInBytes = MemberOffsetInBits / 8;
+    if (Ty->getName().find("<lambda") != std::string::npos) {
+      MemberName = "__this";
+    }
----------------
ZequanWu wrote:

This is inside a for loop iterating the class members. Doesn't this changes all class members name belonging to a lambda to "__this"?

https://github.com/llvm/llvm-project/pull/71564


More information about the llvm-commits mailing list