diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2018-01-15 11:07:47 +0100 |
---|---|---|
committer | MartinNowack <martin.nowack@gmail.com> | 2018-10-26 13:31:07 +0100 |
commit | b0a6688ca476a8b7a9f28b762bace09bf5a431f1 (patch) | |
tree | ab1b174500d982efa73c0a1f7c2f25c5a8ec14a7 /lib/Core | |
parent | 85b2324dd54e63c49ce4936e6b6b0d4d6535fc05 (diff) | |
download | klee-b0a6688ca476a8b7a9f28b762bace09bf5a431f1.tar.gz |
llvm5: use MutableArrayRef for APFloat::convertToInteger
In llvm 5, since commit 957caa243d9270df37a566aedae3f1244e7b62ef, the first parameter to APFloat::convertToInteger is MutableArrayRef. So handle that. Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Diffstat (limited to 'lib/Core')
-rw-r--r-- | lib/Core/Executor.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp index 8ba9cf81..24211453 100644 --- a/lib/Core/Executor.cpp +++ b/lib/Core/Executor.cpp @@ -2319,7 +2319,12 @@ void Executor::executeInstruction(ExecutionState &state, KInstruction *ki) { llvm::APFloat Arg(*fpWidthToSemantics(arg->getWidth()), arg->getAPValue()); uint64_t value = 0; bool isExact = true; - Arg.convertToInteger(&value, resultType, false, +#if LLVM_VERSION_CODE >= LLVM_VERSION(5, 0) + auto valueRef = makeMutableArrayRef(value); +#else + uint64_t *valueRef = &value; +#endif + Arg.convertToInteger(valueRef, resultType, false, llvm::APFloat::rmTowardZero, &isExact); bindLocal(ki, state, ConstantExpr::alloc(value, resultType)); break; @@ -2336,7 +2341,12 @@ void Executor::executeInstruction(ExecutionState &state, KInstruction *ki) { uint64_t value = 0; bool isExact = true; - Arg.convertToInteger(&value, resultType, true, +#if LLVM_VERSION_CODE >= LLVM_VERSION(5, 0) + auto valueRef = makeMutableArrayRef(value); +#else + uint64_t *valueRef = &value; +#endif + Arg.convertToInteger(valueRef, resultType, true, llvm::APFloat::rmTowardZero, &isExact); bindLocal(ki, state, ConstantExpr::alloc(value, resultType)); break; |