Skip to content

Commit

Permalink
Remove manual addition of ConstGEP2 etc
Browse files Browse the repository at this point in the history
  • Loading branch information
lerno committed Dec 17, 2021
1 parent 572aafe commit d305f9d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion wrapper/src/wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<llvm::Constant *> IdxList(llvm::unwrap<llvm::Constant>(ConstantIndices, NumIndices),
Expand All @@ -149,6 +149,7 @@ extern "C" {
llvm::Constant *Val = llvm::unwrap<llvm::Constant>(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)
{
Expand Down

0 comments on commit d305f9d

Please sign in to comment.