From f83c643ae0d71eae3b3d02e083b833be977cf924 Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Thu, 25 Oct 2018 08:09:29 +0200 Subject: llvm5: APInt->getSignBit -> getSignMask This was renamed in LLVM commit 54f0462d2b7f, so handle the rename. Signed-off-by: Jiri Slaby --- lib/Expr/AssignmentGenerator.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') 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 &c_val, const unsigned int size) { std::vector 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) { -- cgit 1.4.1