[clang] [ItaniumMangle] Make sure class types are added to the dictionary of substitution candidates when compiling for older ABIs (PR #138947)
Akira Hatanaka via cfe-commits
cfe-commits at lists.llvm.org
Wed May 7 14:06:35 PDT 2025
ahatanak wrote:
> > Can you confirm that the intent here is to restore mangler behavior to what it was prior to #132401, making the pair of PRs ABI-neutral?
>
> I a bit confused here as well. The description on the PR doesn't say this, but the patch seems to claim that #132401 fixed a bug here, but it was an ABI breaking change, so it wishes to preserve the bug for ABI < 19.
Sorry for the confusion. #132401 caused clang to emit the wrong mangling. Because of the changes made to `CXXNameMangler::mangleType(const MemberPointerType *T)`, `mangleCXXRecordDecl` is called instead of `mangleType`. The latter adds the decl to the substitution candidates regardless of the ABI compat version whereas the former only does so when the version is newer than 19.
https://github.com/llvm/llvm-project/pull/132401/files#diff-8a63be2ffd0742a4ce78d229b1bad68c62dd0b95e39d7f9a378bb52ad3f4a0b7
https://github.com/llvm/llvm-project/pull/138947
More information about the cfe-commits
mailing list