[llvm] 6312c53 - [IRBuilder] Deprecate CreateLoad APIs with implicit type
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 11 09:46:55 PST 2021
Author: Nikita Popov
Date: 2021-03-11T18:46:45+01:00
New Revision: 6312c53870897435b38881795460ad9f34bf9819
URL: https://github.com/llvm/llvm-project/commit/6312c53870897435b38881795460ad9f34bf9819
DIFF: https://github.com/llvm/llvm-project/commit/6312c53870897435b38881795460ad9f34bf9819.diff
LOG: [IRBuilder] Deprecate CreateLoad APIs with implicit type
These APIs are not compatible with opaque pointers. Deprecate them
to avoid the introduction of further uses.
Added:
Modified:
llvm/include/llvm/IR/IRBuilder.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/IR/IRBuilder.h b/llvm/include/llvm/IR/IRBuilder.h
index 10f2d72817e6..477d4815bc9d 100644
--- a/llvm/include/llvm/IR/IRBuilder.h
+++ b/llvm/include/llvm/IR/IRBuilder.h
@@ -1646,17 +1646,27 @@ class IRBuilderBase {
}
// 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 @@ class IRBuilderBase {
}
// 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);
}
More information about the llvm-commits
mailing list