[llvm] 32e2729 - [IRBuilder] Deprecate CreateConstGEP1_64() without element type
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 17 07:44:35 PDT 2021
Author: Nikita Popov
Date: 2021-07-17T16:43:42+02:00
New Revision: 32e2729e337640e547bb6e8bd3dbe43ac36daa81
URL: https://github.com/llvm/llvm-project/commit/32e2729e337640e547bb6e8bd3dbe43ac36daa81
DIFF: https://github.com/llvm/llvm-project/commit/32e2729e337640e547bb6e8bd3dbe43ac36daa81.diff
LOG: [IRBuilder] Deprecate CreateConstGEP1_64() without element type
This API is incompatible with opaque pointers and deprecated in
favor of the version that accepts an explicit element type.
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 7933e4f2735b..dfcc667abf4e 100644
--- a/llvm/include/llvm/IR/IRBuilder.h
+++ b/llvm/include/llvm/IR/IRBuilder.h
@@ -1908,7 +1908,10 @@ class IRBuilderBase {
return Insert(GetElementPtrInst::Create(Ty, Ptr, Idx), Name);
}
- Value *CreateConstGEP1_64(Value *Ptr, uint64_t Idx0, const Twine &Name = "") {
+ LLVM_ATTRIBUTE_DEPRECATED(
+ Value *CreateConstGEP1_64(Value *Ptr, uint64_t Idx0,
+ const Twine &Name = ""),
+ "Use the version with explicit element type instead") {
return CreateConstGEP1_64(
Ptr->getType()->getScalarType()->getPointerElementType(), Ptr, Idx0,
Name);
More information about the llvm-commits
mailing list