[PATCH] D89998: [c++20] For P0732R2 / P1907R1: Basic code generation and name mangling supportfor non-type template parameters of class type and template parameter objects.

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 6 20:21:15 PST 2020


rsmith added inline comments.


================
Comment at: clang/lib/AST/ItaniumMangle.cpp:5181
+      mangleType(T);
+      Out << "0E";
+      return;
----------------
rsmith wrote:
> rjmccall wrote:
> > This could also be extracted and shared with the template-argument mangler.  In fact, isn't most of this case redundant with the template-argument mangler?
> Theoretically yes, but while there's a lot of overlap between `TemplateArgument`s  and `APValue`s, they're different representations and can represent a somewhat different set of values.
> 
> I think we could convert all non-type `TemplateArgument`s to `APValue`s before mangling them, and that might reduce duplication a little, if you'd like?
I've factored out the duplicated mangling of null pointers. I'm not sure if there's much more that's worth pulling out.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89998/new/

https://reviews.llvm.org/D89998



More information about the cfe-commits mailing list