mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 02:33:06 +01:00
[IRBuilder] Deprecate CreateGEP() without element type
This API is incompatible with opaque pointers and deprecated in favor of the version that accepts an explicit element type. Also remove the separate overload for a single index, as this is already covered by the ArrayRef overload.
This commit is contained in:
parent
17b52c557b
commit
055fa09f2c
@ -1784,8 +1784,10 @@ public:
|
||||
return Insert(new AtomicRMWInst(Op, Ptr, Val, *Align, Ordering, SSID));
|
||||
}
|
||||
|
||||
Value *CreateGEP(Value *Ptr, ArrayRef<Value *> IdxList,
|
||||
const Twine &Name = "") {
|
||||
LLVM_ATTRIBUTE_DEPRECATED(
|
||||
Value *CreateGEP(Value *Ptr, ArrayRef<Value *> IdxList,
|
||||
const Twine &Name = ""),
|
||||
"Use the version with explicit element type instead") {
|
||||
return CreateGEP(Ptr->getType()->getScalarType()->getPointerElementType(),
|
||||
Ptr, IdxList, Name);
|
||||
}
|
||||
@ -1828,11 +1830,6 @@ public:
|
||||
return Insert(GetElementPtrInst::CreateInBounds(Ty, Ptr, IdxList), Name);
|
||||
}
|
||||
|
||||
Value *CreateGEP(Value *Ptr, Value *Idx, const Twine &Name = "") {
|
||||
return CreateGEP(Ptr->getType()->getScalarType()->getPointerElementType(),
|
||||
Ptr, Idx, Name);
|
||||
}
|
||||
|
||||
Value *CreateGEP(Type *Ty, Value *Ptr, Value *Idx, const Twine &Name = "") {
|
||||
if (auto *PC = dyn_cast<Constant>(Ptr))
|
||||
if (auto *IC = dyn_cast<Constant>(Idx))
|
||||
|
Loading…
Reference in New Issue
Block a user