forked from OSchip/llvm-project
[IRBuilder] Deprecate CreateLoad APIs with implicit type
These APIs are not compatible with opaque pointers. Deprecate them to avoid the introduction of further uses.
This commit is contained in:
parent
0dff8a9627
commit
6312c53870
|
@ -1646,17 +1646,27 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deprecated [opaque pointer types]
|
// Deprecated [opaque pointer types]
|
||||||
LoadInst *CreateLoad(Value *Ptr, const char *Name) {
|
LLVM_ATTRIBUTE_DEPRECATED(LoadInst *CreateLoad(Value *Ptr,
|
||||||
|
const char *Name),
|
||||||
|
"Use the version that explicitly specifies the "
|
||||||
|
"loaded type instead") {
|
||||||
return CreateLoad(Ptr->getType()->getPointerElementType(), Ptr, Name);
|
return CreateLoad(Ptr->getType()->getPointerElementType(), Ptr, Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deprecated [opaque pointer types]
|
// Deprecated [opaque pointer types]
|
||||||
LoadInst *CreateLoad(Value *Ptr, const Twine &Name = "") {
|
LLVM_ATTRIBUTE_DEPRECATED(LoadInst *CreateLoad(Value *Ptr,
|
||||||
|
const Twine &Name = ""),
|
||||||
|
"Use the version that explicitly specifies the "
|
||||||
|
"loaded type instead") {
|
||||||
return CreateLoad(Ptr->getType()->getPointerElementType(), Ptr, Name);
|
return CreateLoad(Ptr->getType()->getPointerElementType(), Ptr, Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deprecated [opaque pointer types]
|
// Deprecated [opaque pointer types]
|
||||||
LoadInst *CreateLoad(Value *Ptr, bool isVolatile, const Twine &Name = "") {
|
LLVM_ATTRIBUTE_DEPRECATED(LoadInst *CreateLoad(Value *Ptr,
|
||||||
|
bool isVolatile,
|
||||||
|
const Twine &Name = ""),
|
||||||
|
"Use the version that explicitly specifies the "
|
||||||
|
"loaded type instead") {
|
||||||
return CreateLoad(Ptr->getType()->getPointerElementType(), Ptr, isVolatile,
|
return CreateLoad(Ptr->getType()->getPointerElementType(), Ptr, isVolatile,
|
||||||
Name);
|
Name);
|
||||||
}
|
}
|
||||||
|
@ -1685,19 +1695,30 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deprecated [opaque pointer types]
|
// Deprecated [opaque pointer types]
|
||||||
LoadInst *CreateAlignedLoad(Value *Ptr, MaybeAlign Align, const char *Name) {
|
LLVM_ATTRIBUTE_DEPRECATED(LoadInst *CreateAlignedLoad(Value *Ptr,
|
||||||
|
MaybeAlign Align,
|
||||||
|
const char *Name),
|
||||||
|
"Use the version that explicitly specifies the "
|
||||||
|
"loaded type instead") {
|
||||||
return CreateAlignedLoad(Ptr->getType()->getPointerElementType(), Ptr,
|
return CreateAlignedLoad(Ptr->getType()->getPointerElementType(), Ptr,
|
||||||
Align, Name);
|
Align, Name);
|
||||||
}
|
}
|
||||||
// Deprecated [opaque pointer types]
|
// Deprecated [opaque pointer types]
|
||||||
LoadInst *CreateAlignedLoad(Value *Ptr, MaybeAlign Align,
|
LLVM_ATTRIBUTE_DEPRECATED(LoadInst *CreateAlignedLoad(Value *Ptr,
|
||||||
const Twine &Name = "") {
|
MaybeAlign Align,
|
||||||
|
const Twine &Name = ""),
|
||||||
|
"Use the version that explicitly specifies the "
|
||||||
|
"loaded type instead") {
|
||||||
return CreateAlignedLoad(Ptr->getType()->getPointerElementType(), Ptr,
|
return CreateAlignedLoad(Ptr->getType()->getPointerElementType(), Ptr,
|
||||||
Align, Name);
|
Align, Name);
|
||||||
}
|
}
|
||||||
// Deprecated [opaque pointer types]
|
// Deprecated [opaque pointer types]
|
||||||
LoadInst *CreateAlignedLoad(Value *Ptr, MaybeAlign Align, bool isVolatile,
|
LLVM_ATTRIBUTE_DEPRECATED(LoadInst *CreateAlignedLoad(Value *Ptr,
|
||||||
const Twine &Name = "") {
|
MaybeAlign Align,
|
||||||
|
bool isVolatile,
|
||||||
|
const Twine &Name = ""),
|
||||||
|
"Use the version that explicitly specifies the "
|
||||||
|
"loaded type instead") {
|
||||||
return CreateAlignedLoad(Ptr->getType()->getPointerElementType(), Ptr,
|
return CreateAlignedLoad(Ptr->getType()->getPointerElementType(), Ptr,
|
||||||
Align, isVolatile, Name);
|
Align, isVolatile, Name);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue