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);
}
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))