From d305f9da495fadafd31480c267d0379ba577c3f1 Mon Sep 17 00:00:00 2001 From: Christoffer Lerno Date: Fri, 17 Dec 2021 16:00:18 +0100 Subject: [PATCH] Remove manual addition of ConstGEP2 etc --- wrapper/src/wrapper.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wrapper/src/wrapper.cpp b/wrapper/src/wrapper.cpp index 49fdf8aee..6471b2354 100644 --- a/wrapper/src/wrapper.cpp +++ b/wrapper/src/wrapper.cpp @@ -131,7 +131,7 @@ extern "C" { const llvm::APInt& i = Val->getUniqueInteger(); return llvm::wrap(llvm::Constant::getIntegerValue(Val->getType(), i.byteSwap())); } - +#if LLVM_VERSION_MAJOR < 14 LLVMValueRef LLVMConstGEP2(LLVMTypeRef Ty, LLVMValueRef ConstantVal, LLVMValueRef *ConstantIndices, unsigned NumIndices) { llvm::ArrayRef IdxList(llvm::unwrap(ConstantIndices, NumIndices), @@ -149,6 +149,7 @@ extern "C" { llvm::Constant *Val = llvm::unwrap(ConstantVal); return wrap(llvm::ConstantExpr::getInBoundsGetElementPtr(llvm::unwrap(Ty), Val, IdxList)); } +#endif bool llvm_link_elf(const char **args, int arg_count, const char** error_string) {