[IRBuilder] Remove deprecated CreateGlobalStringPtr() method

It has been deprecated in favor of CreateGlobalString() in LLVM 20.
This commit is contained in:
Nikita Popov 2026-01-21 10:07:29 +01:00
parent 856e93713c
commit b9760dc6fb

View File

@ -2015,23 +2015,6 @@ public:
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
//===--------------------------------------------------------------------===//