about summary refs log tree commit diff homepage
path: root/tools
diff options
context:
space:
mode:
authorLukas Zaoral <lzaoral@redhat.com>2020-09-10 17:14:42 +0200
committerCristian Cadar <c.cadar@imperial.ac.uk>2020-12-04 20:35:47 +0000
commit30336015ff88298f38841efa1e0dd120e71f2f67 (patch)
tree8224e8274443bdb68a2669a4d8f594007870bc7d /tools
parentb398c94c821edd3e8699026dc00501062eafd5b2 (diff)
downloadklee-30336015ff88298f38841efa1e0dd120e71f2f67.tar.gz
llvm11: Use getCalledOperand instead of getCalledValue
CallBase::getCalledValue has been deprecated by getCalledOperand since LLVM 8
and has been removed in LLVM 11

See: https://reviews.llvm.org/D78882
Diffstat (limited to 'tools')
-rw-r--r--tools/klee/main.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/klee/main.cpp b/tools/klee/main.cpp
index 874660d7..c1270b46 100644
--- a/tools/klee/main.cpp
+++ b/tools/klee/main.cpp
@@ -917,7 +917,11 @@ void externalsAndGlobalsCheck(const llvm::Module *m) {
       for (BasicBlock::const_iterator it = bbIt->begin(), ie = bbIt->end();
            it != ie; ++it) {
         if (const CallInst *ci = dyn_cast<CallInst>(it)) {
+#if LLVM_VERSION_CODE >= LLVM_VERSION(8, 0)
+          if (isa<InlineAsm>(ci->getCalledOperand())) {
+#else
           if (isa<InlineAsm>(ci->getCalledValue())) {
+#endif
             klee_warning_once(&*fnIt,
                               "function \"%s\" has inline asm",
                               fnIt->getName().data());