diff options
author | Julian Büning <julian.buening@rwth-aachen.de> | 2019-03-20 22:01:00 +0100 |
---|---|---|
committer | MartinNowack <martin.nowack@gmail.com> | 2019-03-21 12:46:01 +0000 |
commit | 9767a37f9e8a743fa81629510346cb0a5a3a7900 (patch) | |
tree | bc49e16925582e41ee51cacc35c4f7bcafd8860f /lib/Core/Executor.cpp | |
parent | eee440835b857a7cb68b72f4af4d22eaf19e1d76 (diff) | |
download | klee-9767a37f9e8a743fa81629510346cb0a5a3a7900.tar.gz |
drop support for LLVM <= 3.7
Diffstat (limited to 'lib/Core/Executor.cpp')
-rw-r--r-- | lib/Core/Executor.cpp | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp index 7a676cc3..d14fae21 100644 --- a/lib/Core/Executor.cpp +++ b/lib/Core/Executor.cpp @@ -56,6 +56,7 @@ #include "llvm/ADT/StringExtras.h" #include "llvm/IR/Attributes.h" #include "llvm/IR/BasicBlock.h" +#include "llvm/IR/CallSite.h" #include "llvm/IR/Constants.h" #include "llvm/IR/DataLayout.h" #include "llvm/IR/Function.h" @@ -70,12 +71,6 @@ #include "llvm/Support/Process.h" #include "llvm/Support/raw_ostream.h" -#if LLVM_VERSION_CODE < LLVM_VERSION(3, 5) -#include "llvm/Support/CallSite.h" -#else -#include "llvm/IR/CallSite.h" -#endif - #include <algorithm> #include <cassert> #include <cerrno> @@ -597,11 +592,7 @@ void Executor::initializeGlobalObject(ExecutionState &state, ObjectState *os, for (unsigned i=0, e=cds->getNumElements(); i != e; ++i) initializeGlobalObject(state, os, cds->getElementAsConstant(i), offset + i*elementSize); -#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 8) } else if (!isa<UndefValue>(c) && !isa<MetadataAsValue>(c)) { -#else - } else if (!isa<UndefValue>(c)) { -#endif unsigned StoreBits = targetData->getTypeStoreSizeInBits(c->getType()); ref<ConstantExpr> C = evalConstant(c); @@ -1560,13 +1551,8 @@ Function* Executor::getTargetFunction(Value *calledVal, ExecutionState &state) { while (true) { if (GlobalValue *gv = dyn_cast<GlobalValue>(c)) { -#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 6) if (!Visited.insert(gv).second) return 0; -#else - if (!Visited.insert(gv)) - return 0; -#endif std::string alias = state.getFnAlias(gv->getName()); if (alias != "") { GlobalValue *old_gv = gv; @@ -1814,12 +1800,7 @@ void Executor::executeInstruction(ExecutionState &state, KInstruction *ki) { std::map<ref<Expr>, BasicBlock *> expressionOrder; // Iterate through all non-default cases and order them by expressions -#if LLVM_VERSION_CODE > LLVM_VERSION(3, 4) for (auto i : si->cases()) { -#else - for (SwitchInst::CaseIt i = si->case_begin(), e = si->case_end(); i != e; - ++i) { -#endif ref<Expr> value = evalConstant(i.getCaseValue()); BasicBlock *caseSuccessor = i.getCaseSuccessor(); @@ -2402,13 +2383,8 @@ void Executor::executeInstruction(ExecutionState &state, KInstruction *ki) { !fpWidthToSemantics(right->getWidth())) return terminateStateOnExecError(state, "Unsupported FRem operation"); llvm::APFloat Res(*fpWidthToSemantics(left->getWidth()), left->getAPValue()); -#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 8) Res.mod( APFloat(*fpWidthToSemantics(right->getWidth()), right->getAPValue())); -#else - Res.mod(APFloat(*fpWidthToSemantics(right->getWidth()),right->getAPValue()), - APFloat::rmNearestTiesToEven); -#endif bindLocal(ki, state, ConstantExpr::alloc(Res.bitcastToAPInt())); break; } |