about summary refs log tree commit diff homepage
path: root/lib
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2018-10-25 08:09:29 +0200
committerMartinNowack <martin.nowack@gmail.com>2018-10-26 13:31:07 +0100
commitf83c643ae0d71eae3b3d02e083b833be977cf924 (patch)
tree9c4ed2292beaf683fbdab0f437f29c3a2a7f1534 /lib
parent0c0e1045b4f784e0f72fd1286a97c7701152d412 (diff)
downloadklee-f83c643ae0d71eae3b3d02e083b833be977cf924.tar.gz
llvm5: APInt->getSignBit -> getSignMask
This was renamed in LLVM commit 54f0462d2b7f, so handle the rename.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/Expr/AssignmentGenerator.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Expr/AssignmentGenerator.cpp b/lib/Expr/AssignmentGenerator.cpp
index 87b75820..dc744ba0 100644
--- a/lib/Expr/AssignmentGenerator.cpp
+++ b/lib/Expr/AssignmentGenerator.cpp
@@ -331,7 +331,11 @@ AssignmentGenerator::getIndexedValue(const std::vector<unsigned char> &c_val,
                                      const unsigned int size) {
   std::vector<unsigned char> toReturn;
   const llvm::APInt index_val = index.getAPValue();
+#if LLVM_VERSION_CODE >= LLVM_VERSION(5, 0)
+  assert(!index_val.isSignMask() && "Negative index");
+#else
   assert(!index_val.isSignBit() && "Negative index");
+#endif
   const uint64_t id = index_val.getZExtValue() / c_val.size();
   uint64_t arraySize = size / c_val.size();
   for (uint64_t i = 0; i < arraySize; ++i) {