[llvm] 251a11f - [IRBuilder] Deprecate CreateConstInBoundsGEP2_64() without element type
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 17 07:43:17 PDT 2021
Author: Nikita Popov
Date: 2021-07-17T16:42:39+02:00
New Revision: 251a11fdcfbc3fdbc3bd9e72c19172b54a607eb2
URL: https://github.com/llvm/llvm-project/commit/251a11fdcfbc3fdbc3bd9e72c19172b54a607eb2
DIFF: https://github.com/llvm/llvm-project/commit/251a11fdcfbc3fdbc3bd9e72c19172b54a607eb2.diff
LOG: [IRBuilder] Deprecate CreateConstInBoundsGEP2_64() without element type
This API is incompatible with opaque pointers and deprecated in
favor of the version that accepts an explicit element type.
Added:
Modified:
llvm/include/llvm/IR/IRBuilder.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/IR/IRBuilder.h b/llvm/include/llvm/IR/IRBuilder.h
index a0a56d173a3a..7933e4f2735b 100644
--- a/llvm/include/llvm/IR/IRBuilder.h
+++ b/llvm/include/llvm/IR/IRBuilder.h
@@ -1966,8 +1966,10 @@ class IRBuilderBase {
return Insert(GetElementPtrInst::CreateInBounds(Ty, Ptr, Idxs), Name);
}
- Value *CreateConstInBoundsGEP2_64(Value *Ptr, uint64_t Idx0, uint64_t Idx1,
- const Twine &Name = "") {
+ LLVM_ATTRIBUTE_DEPRECATED(
+ Value *CreateConstInBoundsGEP2_64(Value *Ptr, uint64_t Idx0,
+ uint64_t Idx1, const Twine &Name = ""),
+ "Use the version with explicit element type instead") {
return CreateConstInBoundsGEP2_64(
Ptr->getType()->getScalarType()->getPointerElementType(), Ptr, Idx0,
Idx1, Name);
More information about the llvm-commits
mailing list