1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 02:33:06 +01:00

[IRBuilder] Deprecate CreateStructGEP() 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 18:33:19 +02:00
parent 5fa3648477
commit 34f02d0dc5

View File

@ -1988,7 +1988,9 @@ public:
return CreateConstInBoundsGEP2_32(Ty, Ptr, 0, Idx, Name);
}
Value *CreateStructGEP(Value *Ptr, unsigned Idx, const Twine &Name = "") {
LLVM_ATTRIBUTE_DEPRECATED(
Value *CreateStructGEP(Value *Ptr, unsigned Idx, const Twine &Name = ""),
"Use the version with explicit element type instead") {
return CreateConstInBoundsGEP2_32(
Ptr->getType()->getScalarType()->getPointerElementType(), Ptr, 0, Idx,
Name);