klee/0015-llvm50-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: llvm50: 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 f73d1614c250..5433d9211ead 100644
--- a/lib/Expr/Expr.cpp
+++ b/lib/Expr/Expr.cpp
@@ -328,7 +328,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.15.1