From 8ac323db7d367799fba9435b64fe715c603e60ba Mon Sep 17 00:00:00 2001 From: Lukas Zaoral Date: Thu, 4 Mar 2021 15:02:57 +0100 Subject: llvm12: VectorType::getNumElements() has been deprecated ... and has already been removed from the LLVM 13 source tree. See: https://reviews.llvm.org/D78127 https://reviews.llvm.org/D95570 --- lib/Core/Executor.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp index a81c4882..aaa56a55 100644 --- a/lib/Core/Executor.cpp +++ b/lib/Core/Executor.cpp @@ -3137,7 +3137,11 @@ void Executor::executeInstruction(ExecutionState &state, KInstruction *ki) { return; } uint64_t iIdx = cIdx->getZExtValue(); +#if LLVM_VERSION_MAJOR >= 11 + const auto *vt = cast(iei->getType()); +#else const llvm::VectorType *vt = iei->getType(); +#endif unsigned EltBits = getWidthForLLVMType(vt->getElementType()); if (iIdx >= vt->getNumElements()) { @@ -3175,7 +3179,11 @@ void Executor::executeInstruction(ExecutionState &state, KInstruction *ki) { return; } uint64_t iIdx = cIdx->getZExtValue(); +#if LLVM_VERSION_MAJOR >= 11 + const auto *vt = cast(eei->getVectorOperandType()); +#else const llvm::VectorType *vt = eei->getVectorOperandType(); +#endif unsigned EltBits = getWidthForLLVMType(vt->getElementType()); if (iIdx >= vt->getNumElements()) { -- cgit 1.4.1