[pkg-d-commits] [ldc] 67/149: Fix compilation error for LLVM 4.0+
Matthias Klumpp
mak at moszumanska.debian.org
Sun Apr 23 22:36:59 UTC 2017
This is an automated email from the git hooks/post-receive script.
mak pushed a commit to annotated tag v1.2.0
in repository ldc.
commit de0708e99b670514d9f0ed627364ad328f54cd6a
Author: Martin <noone at nowhere.com>
Date: Wed Feb 1 20:49:42 2017 +0100
Fix compilation error for LLVM 4.0+
---
gen/target.cpp | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/gen/target.cpp b/gen/target.cpp
index 1361fe8..7f47f41 100644
--- a/gen/target.cpp
+++ b/gen/target.cpp
@@ -57,7 +57,17 @@ void Target::_init() {
classinfosize = 0; // unused
const auto pTargetRealSemantics = &real->getFltSemantics();
- if (pTargetRealSemantics == &APFloat::x87DoubleExtended) {
+#if LDC_LLVM_VER >= 400
+ const auto x87DoubleExtended = &APFloat::x87DoubleExtended();
+ const auto IEEEdouble = &APFloat::IEEEdouble();
+ const auto PPCDoubleDouble = &APFloat::PPCDoubleDouble();
+#else
+ const auto x87DoubleExtended = &APFloat::x87DoubleExtended;
+ const auto IEEEdouble = &APFloat::IEEEdouble;
+ const auto PPCDoubleDouble = &APFloat::PPCDoubleDouble;
+#endif
+
+ if (pTargetRealSemantics == x87DoubleExtended) {
real_max = CTFloat::parse("0x1.fffffffffffffffep+16383");
real_min_normal = CTFloat::parse("0x1p-16382");
real_epsilon = CTFloat::parse("0x1p-63");
@@ -67,8 +77,8 @@ void Target::_init() {
RealProperties::min_exp = -16381;
RealProperties::max_10_exp = 4932;
RealProperties::min_10_exp = -4932;
- } else if (pTargetRealSemantics == &APFloat::IEEEdouble ||
- pTargetRealSemantics == &APFloat::PPCDoubleDouble) {
+ } else if (pTargetRealSemantics == IEEEdouble ||
+ pTargetRealSemantics == PPCDoubleDouble) {
real_max = CTFloat::parse("0x1.fffffffffffffp+1023");
real_min_normal = CTFloat::parse("0x1p-1022");
real_epsilon = CTFloat::parse("0x1p-52");
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-d/ldc.git
More information about the pkg-d-commits
mailing list