diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2018-01-15 10:38:35 +0100 |
---|---|---|
committer | MartinNowack <martin.nowack@gmail.com> | 2018-10-26 13:31:07 +0100 |
commit | 25f2ad1db36ed63acd08afa6bda60446c0fcf11d (patch) | |
tree | 7a6f2d688676bad56cc8f2035e4dfa7a6ce5166d /lib | |
parent | 5fe62b55508a9374519b363f08fc9bf32a0c5151 (diff) | |
download | klee-25f2ad1db36ed63acd08afa6bda60446c0fcf11d.tar.gz |
llvm5: SwitchInst case functions now return pointers
Starting llvm 5, SwitchInst->findCaseValue() now has to be dereferenced using ->. So do so, otherwise we see: ../lib/Core/Executor.cpp:1598:38: error: no member named 'getCaseSuccessor' in 'llvm::SwitchInst::CaseIteratorImpl<llvm::SwitchInst::CaseHandle>'; did you mean to use '->' instead of '.'? BasicBlock *caseSuccessor = i.getCaseSuccessor(); ^ Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Core/Executor.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp index 7c4ee23a..8ba9cf81 100644 --- a/lib/Core/Executor.cpp +++ b/lib/Core/Executor.cpp @@ -1663,7 +1663,11 @@ void Executor::executeInstruction(ExecutionState &state, KInstruction *ki) { // switch to an internal rep. llvm::IntegerType *Ty = cast<IntegerType>(si->getCondition()->getType()); ConstantInt *ci = ConstantInt::get(Ty, CE->getZExtValue()); +#if LLVM_VERSION_CODE >= LLVM_VERSION(5, 0) + unsigned index = si->findCaseValue(ci)->getSuccessorIndex(); +#else unsigned index = si->findCaseValue(ci).getSuccessorIndex(); +#endif transferToBasicBlock(si->getSuccessor(index), si->getParent(), state); } else { // Handle possible different branch targets |