diff options
author | Tue Ly <lntue@google.com> | 2022-01-13 21:31:42 -0500 |
---|---|---|
committer | Tue Ly <lntue@google.com> | 2022-01-13 21:33:05 -0500 |
commit | c386d6eb2d323b6458f9c2ebfaeb20c7a55d6c26 (patch) | |
tree | 9a3604d27ee00059029587ead72209fae487e0f0 /libc | |
parent | Apply clang-tidy fixes for readability-simplify-boolean-expr to MLIR (NFC) (diff) | |
download | llvm-project-c386d6eb2d323b6458f9c2ebfaeb20c7a55d6c26.tar.gz llvm-project-c386d6eb2d323b6458f9c2ebfaeb20c7a55d6c26.tar.bz2 llvm-project-c386d6eb2d323b6458f9c2ebfaeb20c7a55d6c26.zip |
[libc] Fix precision constants for long double in MPFRUtils.cpp.
Diffstat (limited to 'libc')
-rw-r--r-- | libc/utils/MPFRWrapper/MPFRUtils.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libc/utils/MPFRWrapper/MPFRUtils.cpp b/libc/utils/MPFRWrapper/MPFRUtils.cpp index 5339df7a43ac..794f60bdd053 100644 --- a/libc/utils/MPFRWrapper/MPFRUtils.cpp +++ b/libc/utils/MPFRWrapper/MPFRUtils.cpp @@ -10,7 +10,7 @@ #include "src/__support/CPP/StringView.h" #include "src/__support/FPUtil/FPBits.h" -#include "src/__support/architectures.h" +#include "src/__support/FPUtil/PlatformDefs.h" #include "utils/UnitTest/FPMatcher.h" #include <cmath> @@ -47,7 +47,11 @@ template <> struct Precision<double> { static constexpr unsigned int VALUE = 53; }; -#if !(defined(LLVM_LIBC_ARCH_X86)) +#if defined(LONG_DOUBLE_IS_DOUBLE) +template <> struct Precision<long double> { + static constexpr unsigned int VALUE = 53; +}; +#elif defined(SPECIAL_X86_LONG_DOUBLE) template <> struct Precision<long double> { static constexpr unsigned int VALUE = 64; }; |