diff options
| author | Frank Busse <bb0xfb@gmail.com> | 2022-06-13 10:42:51 +0100 |
|---|---|---|
| committer | MartinNowack <2443641+MartinNowack@users.noreply.github.com> | 2022-06-30 10:02:30 +0100 |
| commit | 6cc8ee707c1b4337120aa2972e2ad13a4861bbc3 (patch) | |
| tree | 52aa6fc4f793239963679550e673b6f3a18c3e71 /lib/Module/ModuleUtil.cpp | |
| parent | b8539333fdaf32b0f4911d6569ad56a0443190bb (diff) | |
| download | klee-6cc8ee707c1b4337120aa2972e2ad13a4861bbc3.tar.gz | |
remove LLVM < 9
Diffstat (limited to 'lib/Module/ModuleUtil.cpp')
| -rw-r--r-- | lib/Module/ModuleUtil.cpp | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/lib/Module/ModuleUtil.cpp b/lib/Module/ModuleUtil.cpp index 87a9c917..e1c6e8bd 100644 --- a/lib/Module/ModuleUtil.cpp +++ b/lib/Module/ModuleUtil.cpp @@ -270,17 +270,9 @@ klee::linkModules(std::vector<std::unique_ptr<llvm::Module>> &modules, } Function *klee::getDirectCallTarget( -#if LLVM_VERSION_CODE >= LLVM_VERSION(8, 0) const CallBase &cs, -#else - const CallSite &cs, -#endif bool moduleIsFullyLinked) { -#if LLVM_VERSION_CODE >= LLVM_VERSION(8, 0) Value *v = cs.getCalledOperand(); -#else - Value *v = cs.getCalledValue(); -#endif bool viaConstantExpr = false; // Walk through aliases and bitcasts to try to find // the function being called. @@ -318,16 +310,10 @@ Function *klee::getDirectCallTarget( static bool valueIsOnlyCalled(const Value *v) { for (auto user : v->users()) { -#if LLVM_VERSION_CODE >= LLVM_VERSION(8, 0) // Make sure the instruction is a call or invoke. if (const auto *cs_ptr = dyn_cast<CallBase>(user)) { const CallBase &cs = *cs_ptr; -#else - if (const auto *instr = dyn_cast<Instruction>(user)) { - // Make sure the instruction is a call or invoke. - const CallSite cs(const_cast<Instruction *>(instr)); - if (!cs) return false; -#endif + // Make sure that the value is only the target of this call and // not an argument. if (cs.hasArgument(v)) |
