about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorLukas Zaoral <lzaoral@redhat.com>2020-09-29 15:29:15 +0200
committerCristian Cadar <c.cadar@imperial.ac.uk>2020-12-04 20:35:47 +0000
commit64bcc640f193d6f7f545302f8df8445b00005944 (patch)
treebede0a3541af40ca7a9fba814fd598b98a907615
parent8b4060b226ace6dcdd01f481911977d28f6d32c0 (diff)
downloadklee-64bcc640f193d6f7f545302f8df8445b00005944.tar.gz
llvm11: CallBase::getParamAlignment has been deprecated
and should be replaced with CallBase::getParamAlign
-rw-r--r--lib/Core/Executor.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp
index 0603d148..e3186bbf 100644
--- a/lib/Core/Executor.cpp
+++ b/lib/Core/Executor.cpp
@@ -1851,7 +1851,10 @@ void Executor::executeCall(ExecutionState &state, KInstruction *ki, Function *f,
           offsets[k] = size;
           size += Expr::getMinBytesForWidth(argWidth);
         } else {
-#if LLVM_VERSION_CODE > LLVM_VERSION(4, 0)
+#if LLVM_VERSION_CODE >= LLVM_VERSION(11, 0)
+          MaybeAlign ma = cs.getParamAlign(k);
+          unsigned alignment = ma ? ma->value() : 0;
+#elif LLVM_VERSION_CODE > LLVM_VERSION(4, 0)
           unsigned alignment = cs.getParamAlignment(k);
 #else
           // getParamAlignment() is buggy for LLVM <= 4, so we instead