Skip to content

[libc] Fix compile error in MPFRWrapper when float128 is long double #131821

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 18, 2025

Conversation

overmighty
Copy link
Member

@overmighty overmighty requested a review from lntue March 18, 2025 15:11
@llvmbot llvmbot added the libc label Mar 18, 2025
@llvmbot
Copy link
Member

llvmbot commented Mar 18, 2025

@llvm/pr-subscribers-libc

Author: OverMighty (overmighty)

Changes

See https://lab.llvm.org/buildbot/#/builders/104/builds/18422.


Full diff: https://github.com/llvm/llvm-project/pull/131821.diff

1 Files Affected:

  • (modified) libc/utils/MPFRWrapper/MPFRUtils.cpp (+4-2)
diff --git a/libc/utils/MPFRWrapper/MPFRUtils.cpp b/libc/utils/MPFRWrapper/MPFRUtils.cpp
index da7e4006d134d..fc260f4abed49 100644
--- a/libc/utils/MPFRWrapper/MPFRUtils.cpp
+++ b/libc/utils/MPFRWrapper/MPFRUtils.cpp
@@ -401,7 +401,8 @@ template void explain_binary_operation_one_output_error(
 template void explain_binary_operation_one_output_error(
     Operation, const BinaryInput<long double> &, float16, double, RoundingMode);
 #endif
-#ifdef LIBC_TYPES_HAS_FLOAT128
+#if defined(LIBC_TYPES_HAS_FLOAT128) &&                                        \
+    defined(LIBC_TYPES_FLOAT128_IS_NOT_LONG_DOUBLE)
 template void explain_binary_operation_one_output_error(
     Operation, const BinaryInput<float128> &, float128, double, RoundingMode);
 #endif
@@ -629,7 +630,8 @@ template bool
 compare_binary_operation_one_output(Operation, const BinaryInput<long double> &,
                                     float16, double, RoundingMode);
 #endif
-#ifdef LIBC_TYPES_HAS_FLOAT128
+#if defined(LIBC_TYPES_HAS_FLOAT128) &&                                        \
+    defined(LIBC_TYPES_FLOAT128_IS_NOT_LONG_DOUBLE)
 template bool compare_binary_operation_one_output(Operation,
                                                   const BinaryInput<float128> &,
                                                   float128, double,

@lntue lntue merged commit 3d08377 into llvm:main Mar 18, 2025
15 of 17 checks passed
@overmighty overmighty deleted the libc-fix-mpfrutils-float128 branch March 18, 2025 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants