[demangler] Fix demangling of 'half'

Demangle 'Dh' as 'half' (as per GCC), and not 'decimal16' (which doesn't
make sense, as there is no IEEE 754 decimal16 format).

The Itanium C++ ABI specification describes 'Dh' as:
> IEEE 754r half-precision floating point (16 bits)

(https://itanium-cxx-abi.github.io/cxx-abi/abi.html#mangling-builtin)

Reviewed By: ldionne, jyknight

Differential Revision: https://reviews.llvm.org/D103833
This commit is contained in:
Stuart Brady 2021-06-07 16:30:22 +01:00
parent 54c8902f02
commit 87039c048c
2 changed files with 2 additions and 2 deletions

View File

@ -3883,7 +3883,7 @@ Node *AbstractManglingParser<Derived, Alloc>::parseType() {
// ::= Dh # IEEE 754r half-precision floating point (16 bits)
case 'h':
First += 2;
return make<NameType>("decimal16");
return make<NameType>("half");
// ::= Di # char32_t
case 'i':
First += 2;

View File

@ -3883,7 +3883,7 @@ Node *AbstractManglingParser<Derived, Alloc>::parseType() {
// ::= Dh # IEEE 754r half-precision floating point (16 bits)
case 'h':
First += 2;
return make<NameType>("decimal16");
return make<NameType>("half");
// ::= Di # char32_t
case 'i':
First += 2;