Skip to content

Commit

Permalink
CreateGEP() call: use non-deprecated inBounds option.
Browse files Browse the repository at this point in the history
The constructor taking a boolean is to be deprecated and only available
for backward compatibility for now llvm/include/llvm/IR/GEPNoWrapFlags.h

#xls-build-gardener

PiperOrigin-RevId: 683732142
  • Loading branch information
hzeller authored and copybara-github committed Oct 8, 2024
1 parent 825f277 commit 4f84441
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion xls/jit/ir_builder_visitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include "llvm/include/llvm/IR/BasicBlock.h"
#include "llvm/include/llvm/IR/Constants.h"
#include "llvm/include/llvm/IR/DerivedTypes.h"
#include "llvm/include/llvm/IR/GEPNoWrapFlags.h"
#include "llvm/include/llvm/IR/IRBuilder.h"
#include "llvm/include/llvm/IR/Instructions.h"
#include "llvm/include/llvm/IR/Intrinsics.h"
Expand Down Expand Up @@ -576,7 +577,7 @@ llvm::Value* InvokeCallback(llvm::IRBuilder<>* builder, llvm::Type* return_type,
[](llvm::Value* v) { return v->getType(); });
llvm::Value* fn_ptr_ptr =
builder->CreateGEP(builder->getInt8Ty(), instance_ptr, fn_offset,
"callback_ptr_ptr", /*IsInBounds=*/true);
"callback_ptr_ptr", llvm::GEPNoWrapFlags::inBounds());
llvm::FunctionType* fn_type =
llvm::FunctionType::get(return_type, params_types, /*isVarArg=*/false);
llvm::Value* fn_ptr =
Expand Down

0 comments on commit 4f84441

Please sign in to comment.