[libcxx-commits] [libcxxabi] [llvm] [ItaniumDemangle] Demangle DF16b as bfloat16_t (PR #120109)

Fraser Cormack via libcxx-commits libcxx-commits at lists.llvm.org
Tue Dec 17 02:21:01 PST 2024


================
@@ -4330,9 +4330,12 @@ Node *AbstractManglingParser<Derived, Alloc>::parseType() {
     case 'h':
       First += 2;
       return make<NameType>("half");
-    //                ::= DF <number> _ # ISO/IEC TS 18661 binary floating point (N bits)
+    //       ::= DF16b         # C++23 std::bfloat16_t
+    //       ::= DF <number> _ # ISO/IEC TS 18661 binary floating point (N bits)
     case 'F': {
       First += 2;
+      if (consumeIf("16b"))
+        return make<NameType>("bfloat16_t");
----------------
frasercrmck wrote:

I was wondering that. I have a feeling it should be `std::bfloat16_t` but I don't feel I can rule either way.

It's commented as `std::bfloat16_t` [here](https://github.com/itanium-cxx-abi/cxx-abi/blob/main/abi.html#L5206), for what it's worth.

https://github.com/llvm/llvm-project/pull/120109


More information about the libcxx-commits mailing list