[libcxx-commits] [PATCH] D122530: [demangler] Support C23 _BitInt type
Senran Zhang via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Mar 28 07:42:18 PDT 2022
zsrkmyn marked an inline comment as done.
zsrkmyn added a comment.
In D122530#3411232 <https://reviews.llvm.org/D122530#3411232>, @erichkeane wrote:
> I wonder if there is value, for backwards compatibility to ALSO parse the old `_ExtInt` mangling?
@erichkeane, I'm not sure what `_ExtInt` was mangled to in the past, but it's now is also mangled as `DB`/`DU` using the latest clang, so it's enough to demangle `DB` and `DU` IMO.
$ echo 'int foo(_ExtInt(3), unsigned _ExtInt(5)) {}' | ./builds/dev/bin/clang -S -emit-llvm -xc++ - -o - 2>/dev/null | grep '^define'
define dso_local noundef i32 @_Z3fooDB3_DU5_(i3 noundef signext %0, i5 noundef zeroext %1) #0 {
@aaron.ballman, I also uploaded the test as a small diff using the web interface (instead of the whole file uploaded by arc), so we can see the test change now :-)
================
Comment at: libcxxabi/src/demangle/ItaniumDemangle.h:533-535
+ OB += "_BitInt(";
+ Size->print(OB);
+ OB += ')';
----------------
urnathan wrote:
> Now that D120905 is landed please reword this as
> ```
> OB += "_BitInt";
> OB.printOpen();
> Size->printAsOperand(OB);
> OB.printClose();
> ```
> (See NoexceptSpec as an example). This will handle parens inside Size if this is inside template arg list.
Done. Thanks!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122530/new/
https://reviews.llvm.org/D122530
More information about the libcxx-commits
mailing list