Commit f95d2600 authored by Nikita Popov's avatar Nikita Popov
Browse files

[IRBuilder] Deprecate CreateInBoundsGEP() without element type

This API is incompatible with opaque pointers and deprecated in
favor of the version that accepts an explicit element type.
parent 6225d0cc
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1804,8 +1804,10 @@ public:
    return Insert(GetElementPtrInst::Create(Ty, Ptr, IdxList), Name);
  }

  LLVM_ATTRIBUTE_DEPRECATED(
      Value *CreateInBoundsGEP(Value *Ptr, ArrayRef<Value *> IdxList,
                           const Twine &Name = "") {
                               const Twine &Name = ""),
      "Use the version with explicit element type instead") {
    return CreateInBoundsGEP(
        Ptr->getType()->getScalarType()->getPointerElementType(), Ptr, IdxList,
        Name);