From 6cc8ee707c1b4337120aa2972e2ad13a4861bbc3 Mon Sep 17 00:00:00 2001 From: Frank Busse Date: Mon, 13 Jun 2022 10:42:51 +0100 Subject: remove LLVM < 9 --- lib/Core/StatsTracker.cpp | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'lib/Core/StatsTracker.cpp') diff --git a/lib/Core/StatsTracker.cpp b/lib/Core/StatsTracker.cpp index 28c52b7f..11199db1 100644 --- a/lib/Core/StatsTracker.cpp +++ b/lib/Core/StatsTracker.cpp @@ -29,9 +29,6 @@ #include "llvm/ADT/SmallBitVector.h" #include "llvm/IR/BasicBlock.h" -#if LLVM_VERSION_CODE < LLVM_VERSION(8, 0) -#include "llvm/IR/CallSite.h" -#endif #include "llvm/IR/CFG.h" #include "llvm/IR/Function.h" #include "llvm/IR/InlineAsm.h" @@ -139,13 +136,8 @@ static bool instructionIsCoverable(Instruction *i) { } else { Instruction *prev = &*(--it); if (isa(prev) || isa(prev)) { - Function *target = getDirectCallTarget( -#if LLVM_VERSION_CODE >= LLVM_VERSION(8, 0) - cast(*prev), -#else - CallSite(prev), -#endif - /*moduleIsFullyLinked=*/true); + Function *target = getDirectCallTarget(cast(*prev), + /*moduleIsFullyLinked=*/true); if (target && target->doesNotReturn()) return false; } @@ -794,13 +786,8 @@ void StatsTracker::computeReachableUncovered() { it != ie; ++it) { Instruction *inst = &*it; if (isa(inst) || isa(inst)) { -#if LLVM_VERSION_CODE >= LLVM_VERSION(8, 0) const CallBase &cs = cast(*inst); if (isa(cs.getCalledOperand())) { -#else - const CallSite cs(inst); - if (isa(cs.getCalledValue())) { -#endif // We can never call through here so assume no targets // (which should be correct anyhow). callTargets.insert(std::make_pair(inst, -- cgit 1.4.1