[PATCH] D96816: [ObjC] Encode pointers to C++ classes as "^v" if the encoded string would otherwise include template specialization types
John McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 16 16:10:55 PST 2021
rjmccall accepted this revision.
rjmccall added a comment.
This revision is now accepted and ready to land.
You might want to test nested classes of class templates. I don't know if we encode nested classes in any reasonable way in the first place.
I'm generally okay with being aggressive about stripping this kind of information from encodings, since encodings are not good enough to do type reflection in ObjC++ anyway. If you did decide you wanted to preserve more information from the encoding, though, you could consider only applying this at the innermost level that mentions a template specialization type, rather than the outermost. That is, the new logic seems to not expand the `X` in `X*` if `X` recursively has a field that's a pointer to a template specialization, rather than expanding `X` and then not expanding the type of that one field. Definitely not something I think you need to do now, though.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96816/new/
https://reviews.llvm.org/D96816
More information about the cfe-commits
mailing list