================
@@ -2004,7 +1949,12 @@ void CXXNameMangler::mangleLocalName(GlobalDecl GD,
     // Mangle the name relative to the closest enclosing function.
     // equality ok because RD derived from ND above
     if (D == RD) {
-      mangleUnqualifiedName(RD, DC, AdditionalAbiTags);
+      const NamedDecl *PrefixND = getClosurePrefix(RD);
+      if (PrefixND && !isCompatibleWith(LangOptions::ClangABI::Ver18))
+        mangleNestedNameWithClosurePrefix(GD, PrefixND, AdditionalAbiTags,
+                                          /*NoFunction=*/true);
+      else
+        mangleUnqualifiedName(RD, DC, AdditionalAbiTags);
----------------
zahiraam wrote:

This changes names emitted by Clang 23 at the latest ABI, so I think 
`-fclang-abi-compat=23` should keep the old ones. Shouldn't this be gated on 
`!isCompatibleWith(LangOptions::ClangABI::Ver23)`? If so, please also add a 
bullet under `ABI_VER_MAJOR(23)` in `ABIVersions.def` and a RN.


https://github.com/llvm/llvm-project/pull/235458
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to