klee/0002-llvm5-integerPartWidth-is-from-llvm-APFloatBase.patch

33 lines
1.0 KiB
Diff

From: Jiri Slaby <jirislaby@gmail.com>
Date: Mon, 15 Jan 2018 10:09:20 +0100
Subject: llvm5: integerPartWidth is from llvm::APFloatBase
Patch-mainline: no
Otherwise we see:
../lib/Expr/Expr.cpp:331:14: error: no member named 'integerPartWidth' in namespace 'llvm'; did you mean 'llvm::APFloatBase::integerPartWidth'?
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
lib/Expr/Expr.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lib/Expr/Expr.cpp b/lib/Expr/Expr.cpp
index a5c7f652e976..65e858c3336d 100644
--- a/lib/Expr/Expr.cpp
+++ b/lib/Expr/Expr.cpp
@@ -333,7 +333,11 @@ ref<Expr> ConstantExpr::fromMemory(void *address, Width width) {
// FIXME: what about machines without x87 support?
default:
return ConstantExpr::alloc(llvm::APInt(width,
+#if LLVM_VERSION_CODE >= LLVM_VERSION(5, 0)
+ (width+llvm::APFloatBase::integerPartWidth-1)/llvm::APFloatBase::integerPartWidth,
+#else
(width+llvm::integerPartWidth-1)/llvm::integerPartWidth,
+#endif
(const uint64_t*)address));
}
}
--
2.19.0