[clang] [clang] Avoid MS RTTI type_info name explosion (PR #206317)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 3 03:14:17 PDT 2026
================
@@ -963,7 +970,9 @@ void MicrosoftCXXNameMangler::mangleName(GlobalDecl GD) {
// Always start with the unqualified name.
mangleUnqualifiedName(GD);
- mangleNestedName(GD);
+ const auto *RD = dyn_cast<CXXRecordDecl>(GD.getDecl());
+ if (!ShortenRTTINames || !RD || !RD->isLambda())
+ mangleNestedName(GD);
----------------
mzukovec wrote:
This was an old debugging remnant and unnecessary - the source of this change was that each level's lambda context re-spells the enclosing make_layer<T> where T is the previous level's full pack<..., lambda, ...>.
I cleaned the PR and audited it with Fable 5 just in case. It should be a simple change now that still resolves the bloat issue.
https://github.com/llvm/llvm-project/pull/206317
More information about the cfe-commits
mailing list