akhuang added inline comments.
================ Comment at: clang/include/clang/AST/Mangle.h:92 + virtual StringRef getLambdaString(const CXXRecordDecl *Lambda) = 0; + ---------------- rnk wrote: > I think I would prefer to have this return a number. I think CGDebugInfo > should be responsible for the formatting of the display names, not the > mangler. Both the MS and Itanium manglers have private methods for numbering > internal linkage lambdas, and I think it would be reasonable to hook those up > to a public virtual method. I used a string because we mangle some lambdas like <lambda_1_1> (when they're used as function parameters). Maybe we don't need to differentiate between these lambdas though? ================ Comment at: clang/lib/AST/ItaniumMangle.cpp:210 + if (Number == 0) + return getAnonymousStructId(Lambda); + return Number; ---------------- rnk wrote: > This has the potential to create a situation where enabling debug info > changes the internal mangled names that clang uses. To be *extra* safe, you > could add a method like `getAnonymousStructIdForDebugInfo` that does .find > instead of .insert, and use it here. Oh, right, yeah. I guess I'll just let it return 0 if it's not found. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95187/new/ https://reviews.llvm.org/D95187 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits