From 64bcc640f193d6f7f545302f8df8445b00005944 Mon Sep 17 00:00:00 2001 From: Lukas Zaoral Date: Tue, 29 Sep 2020 15:29:15 +0200 Subject: llvm11: CallBase::getParamAlignment has been deprecated and should be replaced with CallBase::getParamAlign --- lib/Core/Executor.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- cgit 1.4.1