Skip to content

Commit

Permalink
[IRBuilder] Deprecate CreateConstInBoundsGEP1_64() without element type
Browse files Browse the repository at this point in the history
This API is incompatible with opaque pointers and deprecated in
favor of the version that accepts an explicit element type.
  • Loading branch information
nikic committed Jul 17, 2021
1 parent 5071360 commit 5df4849
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions llvm/include/llvm/IR/IRBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -1927,8 +1927,10 @@ class IRBuilderBase {
return Insert(GetElementPtrInst::CreateInBounds(Ty, Ptr, Idx), Name);
}

Value *CreateConstInBoundsGEP1_64(Value *Ptr, uint64_t Idx0,
const Twine &Name = "") {
LLVM_ATTRIBUTE_DEPRECATED(
Value *CreateConstInBoundsGEP1_64(Value *Ptr, uint64_t Idx0,
const Twine &Name = ""),
"Use the version with explicit element type instead") {
return CreateConstInBoundsGEP1_64(
Ptr->getType()->getScalarType()->getPointerElementType(), Ptr, Idx0,
Name);
Expand Down

0 comments on commit 5df4849

Please sign in to comment.