diff options
author | Lukas Zaoral <lzaoral@redhat.com> | 2020-09-12 11:02:29 +0200 |
---|---|---|
committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2020-09-26 21:31:49 +0100 |
commit | 3983b23eac93b0e6f28ffba4b626401c5280c10f (patch) | |
tree | 5589ff2a11f892cb4911c235e7856ef965cc4059 /include | |
parent | e9aaebb43b5789692377e7b367813e8b3b728484 (diff) | |
download | klee-3983b23eac93b0e6f28ffba4b626401c5280c10f.tar.gz |
Replace llvm::CallSite with llvm::CallBase on LLVM 8+
This is in preparation for LLVM 11 as the llvm:CallSite class has been removed.
Diffstat (limited to 'include')
-rw-r--r-- | include/klee/Support/ModuleUtil.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/include/klee/Support/ModuleUtil.h b/include/klee/Support/ModuleUtil.h index e80fc673..40c58f4e 100644 --- a/include/klee/Support/ModuleUtil.h +++ b/include/klee/Support/ModuleUtil.h @@ -12,7 +12,11 @@ #include "klee/Config/Version.h" +#if LLVM_VERSION_CODE >= LLVM_VERSION(8, 0) +#include "llvm/IR/InstrTypes.h" +#else #include "llvm/IR/CallSite.h" +#endif #include "llvm/IR/Module.h" #include <memory> @@ -41,9 +45,16 @@ linkModules(std::vector<std::unique_ptr<llvm::Module>> &modules, /// another possibility). /// /// If `moduleIsFullyLinked` is set to true it will be assumed that the -/// module containing the `llvm::CallSite` is fully linked. This assumption -/// allows resolution of functions that are marked as overridable. -llvm::Function *getDirectCallTarget(llvm::CallSite, bool moduleIsFullyLinked); +/// module containing the `llvm::CallSite` (`llvm::CallBase` on LLVM 8+) +/// is fully linked. This assumption allows resolution of functions +/// that are marked as overridable. +llvm::Function *getDirectCallTarget( +#if LLVM_VERSION_CODE >= LLVM_VERSION(8, 0) + const llvm::CallBase &cb, +#else + const llvm::CallSite &cs, +#endif + bool moduleIsFullyLinked); /// Return true iff the given Function value is used in something /// other than a direct call (or a constant expression that |