Skip to content

Commit 87039c0

Browse files
committed
[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
1 parent 54c8902 commit 87039c0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

libcxxabi/src/demangle/ItaniumDemangle.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3883,7 +3883,7 @@ Node *AbstractManglingParser<Derived, Alloc>::parseType() {
38833883
// ::= Dh # IEEE 754r half-precision floating point (16 bits)
38843884
case 'h':
38853885
First += 2;
3886-
return make<NameType>("decimal16");
3886+
return make<NameType>("half");
38873887
// ::= Di # char32_t
38883888
case 'i':
38893889
First += 2;

llvm/include/llvm/Demangle/ItaniumDemangle.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3883,7 +3883,7 @@ Node *AbstractManglingParser<Derived, Alloc>::parseType() {
38833883
// ::= Dh # IEEE 754r half-precision floating point (16 bits)
38843884
case 'h':
38853885
First += 2;
3886-
return make<NameType>("decimal16");
3886+
return make<NameType>("half");
38873887
// ::= Di # char32_t
38883888
case 'i':
38893889
First += 2;

0 commit comments

Comments
 (0)