diff options
author | Frank Busse <bb0xfb@gmail.com> | 2021-12-15 16:20:29 +0000 |
---|---|---|
committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2022-03-17 22:59:26 +0000 |
commit | d8553f3cec042b5af9e21c268cb14ee8f7b30083 (patch) | |
tree | d8545f09d6ae508df5a8d19ad30b6dbd6f1e4182 /lib/Module/IntrinsicCleaner.cpp | |
parent | 8cab09eb98d06d488e036ceec9f4b16090502297 (diff) | |
download | klee-d8553f3cec042b5af9e21c268cb14ee8f7b30083.tar.gz |
remove LLVM < 6 from sources
Diffstat (limited to 'lib/Module/IntrinsicCleaner.cpp')
-rw-r--r-- | lib/Module/IntrinsicCleaner.cpp | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/lib/Module/IntrinsicCleaner.cpp b/lib/Module/IntrinsicCleaner.cpp index f4b867e5..d15db10a 100644 --- a/lib/Module/IntrinsicCleaner.cpp +++ b/lib/Module/IntrinsicCleaner.cpp @@ -317,30 +317,9 @@ bool IntrinsicCleanerPass::runOnBasicBlock(BasicBlock &b, Module &M) { break; } case Intrinsic::objectsize: { -#if LLVM_VERSION_CODE >= LLVM_VERSION(4, 0) // Lower the call to a concrete value auto replacement = llvm::lowerObjectSizeCall(ii, DataLayout, nullptr, /*MustSucceed=*/true); -#else - // We don't know the size of an object in general so we replace - // with 0 or -1 depending on the second argument to the intrinsic. - assert(ii->getNumArgOperands() == 2 && "wrong number of arguments"); - auto minArg = dyn_cast_or_null<ConstantInt>(ii->getArgOperand(1)); - assert(minArg && - "Failed to get second argument or it is not ConstantInt"); - assert(minArg->getBitWidth() == 1 && "Second argument is not an i1"); - ConstantInt *replacement = nullptr; - IntegerType *intType = dyn_cast<IntegerType>(ii->getType()); - assert(intType && "intrinsic does not have integer return type"); - if (minArg->isZero()) { - // min=false - replacement = ConstantInt::get(intType, -1, /*isSigned=*/true); - } else { - // min=true - replacement = ConstantInt::get(intType, 0, /*isSigned=*/false); - } - -#endif ii->replaceAllUsesWith(replacement); ii->eraseFromParent(); dirty = true; @@ -361,9 +340,7 @@ bool IntrinsicCleanerPass::runOnBasicBlock(BasicBlock &b, Module &M) { // The following intrinsics are currently handled by LowerIntrinsicCall // (Invoking LowerIntrinsicCall with any intrinsics not on this // list throws an exception.) -#if LLVM_VERSION_CODE >= LLVM_VERSION(4, 0) case Intrinsic::addressofreturnaddress: -#endif case Intrinsic::annotation: case Intrinsic::assume: case Intrinsic::bswap: |