From 37e92d0c802524c19a9a84164253639aac47fee3 Mon Sep 17 00:00:00 2001 From: Martin Nowack Date: Sat, 22 Jul 2017 01:03:44 +0200 Subject: Remove support for LLVM < 3.4 Request LLVM 3.4 as minimal requirement for KLEE --- lib/Core/ExecutorUtil.cpp | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'lib/Core/ExecutorUtil.cpp') diff --git a/lib/Core/ExecutorUtil.cpp b/lib/Core/ExecutorUtil.cpp index b91b5dee..bd7c0711 100644 --- a/lib/Core/ExecutorUtil.cpp +++ b/lib/Core/ExecutorUtil.cpp @@ -20,23 +20,11 @@ #include "klee/util/GetElementPtrTypeIterator.h" -#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 3) #include "llvm/IR/Function.h" #include "llvm/IR/Constants.h" #include "llvm/IR/Instructions.h" #include "llvm/IR/Module.h" #include "llvm/IR/DataLayout.h" -#else -#include "llvm/Constants.h" -#include "llvm/Function.h" -#include "llvm/Instructions.h" -#include "llvm/Module.h" -#if LLVM_VERSION_CODE <= LLVM_VERSION(3, 1) -#include "llvm/Target/TargetData.h" -#else -#include "llvm/DataLayout.h" -#endif -#endif #include @@ -46,7 +34,7 @@ using namespace llvm; namespace klee { ref Executor::evalConstantExpr(const llvm::ConstantExpr *ce) { - LLVM_TYPE_Q llvm::Type *type = ce->getType(); + llvm::Type *type = ce->getType(); ref op1(0), op2(0), op3(0); int numOperands = ce->getNumOperands(); @@ -95,7 +83,7 @@ namespace klee { ref addend = ConstantExpr::alloc(0, Context::get().getPointerWidth()); - if (LLVM_TYPE_Q StructType *st = dyn_cast(*ii)) { + if (StructType *st = dyn_cast(*ii)) { const StructLayout *sl = kmodule->targetData->getStructLayout(st); const ConstantInt *ci = cast(ii.getOperand()); @@ -153,11 +141,7 @@ namespace klee { case Instruction::FCmp: assert(0 && "floating point ConstantExprs unsupported"); } -#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 1) llvm_unreachable("Unsupported expression in evalConstantExpr"); -#else - assert(0 && "Unsupported expression in evalConstantExpr"); -#endif return op1; } } -- cgit 1.4.1