mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-23 22:00:10 +00:00
[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]
|
||||
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);
|
||||
}
|
||||
|
||||
// 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);
|
||||
}
|
||||
|
||||
// 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,
|
||||
Name);
|
||||
}
|
||||
@ -1685,19 +1695,30 @@ public:
|
||||
}
|
||||
|
||||
// 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,
|
||||
Align, Name);
|
||||
}
|
||||
// Deprecated [opaque pointer types]
|
||||
LoadInst *CreateAlignedLoad(Value *Ptr, MaybeAlign Align,
|
||||
const Twine &Name = "") {
|
||||
LLVM_ATTRIBUTE_DEPRECATED(LoadInst *CreateAlignedLoad(Value *Ptr,
|
||||
MaybeAlign Align,
|
||||
const Twine &Name = ""),
|
||||
"Use the version that explicitly specifies the "
|
||||
"loaded type instead") {
|
||||
return CreateAlignedLoad(Ptr->getType()->getPointerElementType(), Ptr,
|
||||
Align, Name);
|
||||
}
|
||||
// Deprecated [opaque pointer types]
|
||||
LoadInst *CreateAlignedLoad(Value *Ptr, MaybeAlign Align, bool isVolatile,
|
||||
const Twine &Name = "") {
|
||||
LLVM_ATTRIBUTE_DEPRECATED(LoadInst *CreateAlignedLoad(Value *Ptr,
|
||||
MaybeAlign Align,
|
||||
bool isVolatile,
|
||||
const Twine &Name = ""),
|
||||
"Use the version that explicitly specifies the "
|
||||
"loaded type instead") {
|
||||
return CreateAlignedLoad(Ptr->getType()->getPointerElementType(), Ptr,
|
||||
Align, isVolatile, Name);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user