[libcxx-commits] [libcxxabi] [libcxxabi] Fix the long double demangling for PowerPC (PR #135332)
via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Apr 11 01:59:35 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libcxxabi
Author: Martin Storsjö (mstorsjo)
<details>
<summary>Changes</summary>
PowerPC uses a slightly different type of floats for their 128 bit long doubles, as "double-double", with __LDBL_MANT_DIG__ == 106 rather than __LDBL_MANT_DIG__ == 113 for IEEE 128 bit floats.
This fixes compiling libcxxabi for PowerPC after
3b70715c13876c51542ebfe2e3f4ee908f6785cb.
---
Full diff: https://github.com/llvm/llvm-project/pull/135332.diff
1 Files Affected:
- (modified) libcxxabi/src/demangle/ItaniumDemangle.h (+1-1)
``````````diff
diff --git a/libcxxabi/src/demangle/ItaniumDemangle.h b/libcxxabi/src/demangle/ItaniumDemangle.h
index b9d17060c04f9..eca9ddad66f92 100644
--- a/libcxxabi/src/demangle/ItaniumDemangle.h
+++ b/libcxxabi/src/demangle/ItaniumDemangle.h
@@ -5741,7 +5741,7 @@ struct FloatData<double>
template <>
struct FloatData<long double>
{
-#if __LDBL_MANT_DIG__ == 113
+#if __LDBL_MANT_DIG__ == 113 || __LDBL_MANT_DIG__ == 106
static const size_t mangled_size = 32;
#elif __LDBL_MANT_DIG__ == 53 || defined(_MSC_VER)
// MSVC doesn't define __LDBL_MANT_DIG__, but it has long double equal to
``````````
</details>
https://github.com/llvm/llvm-project/pull/135332
More information about the libcxx-commits
mailing list