[PATCH] D122530: [demangler] Support C23 _BitInt type

Erich Keane via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 28 07:48:31 PDT 2022


erichkeane added a comment.

In D122530#3411449 <https://reviews.llvm.org/D122530#3411449>, @zsrkmyn wrote:

> 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 now is also mangled as `DB`/`DU` using the latest clang, so it's enough to demangle `DB` and `DU` IMO.

I went to look it up, we used to mangle it as a 'struct', so it demangled anyway (so `_ExtInt13` was : `U7_ExtIntILi13`, so `void foo(_ExtInt(13))` was `_Z3fooU7_ExtIntILi13EEi`.

>   $ 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 :-)




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

https://reviews.llvm.org/D122530



More information about the llvm-commits mailing list