================
@@ -7326,11 +7326,13 @@ void 
ItaniumMangleContextImpl::mangleCXXCtorVTable(const CXXRecordDecl *RD,
                                                    raw_ostream &Out) {
   // <special-name> ::= TC <type> <offset number> _ <base type>
   CXXNameMangler Mangler(*this, Out);
+  QualType RDType = getASTContext().getRecordType(RD);
+  QualType TypeType = getASTContext().getRecordType(Type);
   Mangler.getStream() << "_ZTC";
-  Mangler.mangleNameOrStandardSubstitution(RD);
+  Mangler.mangleType(RDType);
----------------
tcwzxx wrote:

> I'd prefer we fix `mangleNameOrStandardSubstitution` itself.
> We could rename it to `mangleCXXRecordDecl`, have it take a CXXRecordDecl*, 
> and handle the substitutions there.
> This would avoid the same trap in a potential future user.

After rechecking the code, I found that the users of the 
`mangleNameOrStandardSubstitution` function are `mangleCXXCtorVTable`, 
`mangleCXXVTable`, and `mangleCXXVTT`. In the Itanium ABI documentation, these 
situations are considered as 'Type'. So, maybe we can remove 
`mangleNameOrStandardSubstitution` and then use `mangleType`.

https://github.com/llvm/llvm-project/pull/109970
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to