Skip to content

Commit f95d260

Browse files
committed
[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.
1 parent 6225d0c commit f95d260

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

llvm/include/llvm/IR/IRBuilder.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1804,8 +1804,10 @@ class IRBuilderBase {
18041804
return Insert(GetElementPtrInst::Create(Ty, Ptr, IdxList), Name);
18051805
}
18061806

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

0 commit comments

Comments
 (0)