Skip to content

Commit 03e4351

Browse files
committed
[IRBuilder] Deprecate CreateConstGEP1_32() 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 6d3e7c7 commit 03e4351

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

llvm/include/llvm/IR/IRBuilder.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1846,7 +1846,10 @@ class IRBuilderBase {
18461846
return Insert(GetElementPtrInst::CreateInBounds(Ty, Ptr, Idx), Name);
18471847
}
18481848

1849-
Value *CreateConstGEP1_32(Value *Ptr, unsigned Idx0, const Twine &Name = "") {
1849+
LLVM_ATTRIBUTE_DEPRECATED(
1850+
Value *CreateConstGEP1_32(Value *Ptr, unsigned Idx0,
1851+
const Twine &Name = ""),
1852+
"Use the version with explicit element type instead") {
18501853
return CreateConstGEP1_32(
18511854
Ptr->getType()->getScalarType()->getPointerElementType(), Ptr, Idx0,
18521855
Name);

0 commit comments

Comments
 (0)