[PATCH] D95187: [DebugInfo][CodeView] Use <lambda_n> as the display name for lambdas.
Reid Kleckner via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 26 11:29:24 PST 2021
rnk added a comment.
I see a potential issue, but I think this looks good otherwise.
================
Comment at: clang/lib/AST/ItaniumMangle.cpp:210
+ if (Number == 0)
+ return getAnonymousStructId(Lambda);
+ return Number;
----------------
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.
================
Comment at: clang/lib/AST/MicrosoftMangle.cpp:236
+ else
+ return getLambdaId(Lambda);
+ }
----------------
This has a similar concern, this isn't a readonly operation.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95187/new/
https://reviews.llvm.org/D95187
More information about the cfe-commits
mailing list