[llvm] 03e4351 - [IRBuilder] Deprecate CreateConstGEP1_32() without element type
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 17 09:32:51 PDT 2021
Author: Nikita Popov
Date: 2021-07-17T18:32:36+02:00
New Revision: 03e4351013c133a3aabe3d7b9cded9d3153764f0
URL: https://github.com/llvm/llvm-project/commit/03e4351013c133a3aabe3d7b9cded9d3153764f0
DIFF: https://github.com/llvm/llvm-project/commit/03e4351013c133a3aabe3d7b9cded9d3153764f0.diff
LOG: [IRBuilder] Deprecate CreateConstGEP1_32() 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 4a5c03dd0ede..0c7843b158b2 100644
--- a/llvm/include/llvm/IR/IRBuilder.h
+++ b/llvm/include/llvm/IR/IRBuilder.h
@@ -1846,7 +1846,10 @@ class IRBuilderBase {
return Insert(GetElementPtrInst::CreateInBounds(Ty, Ptr, Idx), Name);
}
- Value *CreateConstGEP1_32(Value *Ptr, unsigned Idx0, const Twine &Name = "") {
+ LLVM_ATTRIBUTE_DEPRECATED(
+ Value *CreateConstGEP1_32(Value *Ptr, unsigned Idx0,
+ const Twine &Name = ""),
+ "Use the version with explicit element type instead") {
return CreateConstGEP1_32(
Ptr->getType()->getScalarType()->getPointerElementType(), Ptr, Idx0,
Name);
More information about the llvm-commits
mailing list