[llvm] b9760dc - [IRBuilder] Remove deprecated CreateGlobalStringPtr() method
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 21 01:09:57 PST 2026
Author: Nikita Popov
Date: 2026-01-21T10:09:46+01:00
New Revision: b9760dc6fbd65a29fb6773539f19b7c964da3e85
URL: https://github.com/llvm/llvm-project/commit/b9760dc6fbd65a29fb6773539f19b7c964da3e85
DIFF: https://github.com/llvm/llvm-project/commit/b9760dc6fbd65a29fb6773539f19b7c964da3e85.diff
LOG: [IRBuilder] Remove deprecated CreateGlobalStringPtr() method
It has been deprecated in favor of CreateGlobalString() in LLVM 20.
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 8c33f6efbe742..bc4e909269b80 100644
--- a/llvm/include/llvm/IR/IRBuilder.h
+++ b/llvm/include/llvm/IR/IRBuilder.h
@@ -2015,23 +2015,6 @@ class IRBuilderBase {
GEPNoWrapFlags::inBounds());
}
- /// Same as CreateGlobalString, but return a pointer with "i8*" type
- /// instead of a pointer to array of i8.
- ///
- /// If no module is given via \p M, it is take from the insertion point basic
- /// block.
- LLVM_DEPRECATED("Use CreateGlobalString instead", "CreateGlobalString")
- Constant *CreateGlobalStringPtr(StringRef Str, const Twine &Name = "",
- unsigned AddressSpace = 0,
- Module *M = nullptr, bool AddNull = true) {
- GlobalVariable *GV =
- CreateGlobalString(Str, Name, AddressSpace, M, AddNull);
- Constant *Zero = ConstantInt::get(Type::getInt32Ty(Context), 0);
- Constant *Indices[] = {Zero, Zero};
- return ConstantExpr::getInBoundsGetElementPtr(GV->getValueType(), GV,
- Indices);
- }
-
//===--------------------------------------------------------------------===//
// Instruction creation methods: Cast/Conversion Operators
//===--------------------------------------------------------------------===//
More information about the llvm-commits
mailing list