[IRBuilder] Deprecate CreateConstGEP1_64() without element type

This API is incompatible with opaque pointers and deprecated in
favor of the version that accepts an explicit element type.
This commit is contained in:
Nikita Popov 2021-07-17 16:25:55 +02:00
parent 357756ecf6
commit 32e2729e33
1 changed files with 4 additions and 1 deletions

View File

@ -1908,7 +1908,10 @@ public:
return Insert(GetElementPtrInst::Create(Ty, Ptr, Idx), Name);
}
Value *CreateConstGEP1_64(Value *Ptr, uint64_t Idx0, const Twine &Name = "") {
LLVM_ATTRIBUTE_DEPRECATED(
Value *CreateConstGEP1_64(Value *Ptr, uint64_t Idx0,
const Twine &Name = ""),
"Use the version with explicit element type instead") {
return CreateConstGEP1_64(
Ptr->getType()->getScalarType()->getPointerElementType(), Ptr, Idx0,
Name);