mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
eliminate the "string" form of ConstantArray::get, using
ConstantDataArray::getString instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149365 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -780,12 +780,6 @@ Constant *ConstantArray::get(ArrayType *Ty, ArrayRef<Constant*> V) {
|
||||
return pImpl->ArrayConstants.getOrCreate(Ty, V);
|
||||
}
|
||||
|
||||
// FIXME: Remove this method.
|
||||
Constant *ConstantArray::get(LLVMContext &Context, StringRef Str,
|
||||
bool AddNull) {
|
||||
return ConstantDataArray::getString(Context, Str, AddNull);
|
||||
}
|
||||
|
||||
/// getTypeForElements - Return an anonymous struct type to use for a constant
|
||||
/// with the specified set of elements. The list must not be empty.
|
||||
StructType *ConstantStruct::getTypeForElements(LLVMContext &Context,
|
||||
|
@@ -634,8 +634,8 @@ LLVMValueRef LLVMConstStringInContext(LLVMContextRef C, const char *Str,
|
||||
LLVMBool DontNullTerminate) {
|
||||
/* Inverted the sense of AddNull because ', 0)' is a
|
||||
better mnemonic for null termination than ', 1)'. */
|
||||
return wrap(ConstantArray::get(*unwrap(C), StringRef(Str, Length),
|
||||
DontNullTerminate == 0));
|
||||
return wrap(ConstantDataArray::getString(*unwrap(C), StringRef(Str, Length),
|
||||
DontNullTerminate == 0));
|
||||
}
|
||||
LLVMValueRef LLVMConstStructInContext(LLVMContextRef C,
|
||||
LLVMValueRef *ConstantVals,
|
||||
|
@@ -24,7 +24,7 @@ using namespace llvm;
|
||||
/// specified. If Name is specified, it is the name of the global variable
|
||||
/// created.
|
||||
Value *IRBuilderBase::CreateGlobalString(StringRef Str, const Twine &Name) {
|
||||
Constant *StrConstant = ConstantArray::get(Context, Str, true);
|
||||
Constant *StrConstant = ConstantDataArray::getString(Context, Str);
|
||||
Module &M = *BB->getParent()->getParent();
|
||||
GlobalVariable *GV = new GlobalVariable(M, StrConstant->getType(),
|
||||
true, GlobalValue::PrivateLinkage,
|
||||
|
Reference in New Issue
Block a user