about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
-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) {