diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-01-12 06:52:38 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-12 06:52:38 +0100 |
| commit | a90742ac98dee241d910eb0f3a7188313e14c91b (patch) | |
| tree | 358722e3d2479d8b10c45fce15d4695093355080 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | 8a13157c16f279dfa46d0ef92ceb39bcbbcfe729 (diff) | |
| parent | 4f0c88f8bda92e16db9b59e5c585ae882dd4a086 (diff) | |
| download | rust-a90742ac98dee241d910eb0f3a7188313e14c91b.tar.gz rust-a90742ac98dee241d910eb0f3a7188313e14c91b.zip | |
Rollup merge of #106732 - durin42:dmitrig-arrayref-ctor, r=nikic
rustc_llvm: replace llvm::makeArrayRef with ArrayRef constructors. LLVM upstream has deprecated llvm::makeArrayRef and will remove it.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp index 279b6991854..8f94e8a4ab2 100644 --- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp @@ -257,7 +257,7 @@ template<typename T> static inline void AddAttributes(T *t, unsigned Index, PALNew = PAL.addAttributes(t->getContext(), Index, B); #else AttrBuilder B(t->getContext()); - for (LLVMAttributeRef Attr : makeArrayRef(Attrs, AttrsLen)) + for (LLVMAttributeRef Attr : ArrayRef<LLVMAttributeRef>(Attrs, AttrsLen)) B.addAttribute(unwrap(Attr)); PALNew = PAL.addAttributesAtIndex(t->getContext(), Index, B); #endif @@ -1064,7 +1064,7 @@ extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateEnumerator( LLVMRustDIBuilderRef Builder, const char *Name, size_t NameLen, const uint64_t Value[2], unsigned SizeInBits, bool IsUnsigned) { return wrap(Builder->createEnumerator(StringRef(Name, NameLen), - APSInt(APInt(SizeInBits, makeArrayRef(Value, 2)), IsUnsigned))); + APSInt(APInt(SizeInBits, ArrayRef<uint64_t>(Value, 2)), IsUnsigned))); } extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateEnumerationType( @@ -1477,7 +1477,7 @@ extern "C" void LLVMRustAddHandler(LLVMValueRef CatchSwitchRef, extern "C" OperandBundleDef *LLVMRustBuildOperandBundleDef(const char *Name, LLVMValueRef *Inputs, unsigned NumInputs) { - return new OperandBundleDef(Name, makeArrayRef(unwrap(Inputs), NumInputs)); + return new OperandBundleDef(Name, ArrayRef<Value*>(unwrap(Inputs), NumInputs)); } extern "C" void LLVMRustFreeOperandBundleDef(OperandBundleDef *Bundle) { @@ -1491,8 +1491,8 @@ extern "C" LLVMValueRef LLVMRustBuildCall(LLVMBuilderRef B, LLVMTypeRef Ty, LLVM Value *Callee = unwrap(Fn); FunctionType *FTy = unwrap<FunctionType>(Ty); return wrap(unwrap(B)->CreateCall( - FTy, Callee, makeArrayRef(unwrap(Args), NumArgs), - makeArrayRef(*OpBundles, NumOpBundles))); + FTy, Callee, ArrayRef<Value*>(unwrap(Args), NumArgs), + ArrayRef<OperandBundleDef>(*OpBundles, NumOpBundles))); } extern "C" LLVMValueRef LLVMRustGetInstrProfIncrementIntrinsic(LLVMModuleRef M) { @@ -1537,8 +1537,8 @@ LLVMRustBuildInvoke(LLVMBuilderRef B, LLVMTypeRef Ty, LLVMValueRef Fn, Value *Callee = unwrap(Fn); FunctionType *FTy = unwrap<FunctionType>(Ty); return wrap(unwrap(B)->CreateInvoke(FTy, Callee, unwrap(Then), unwrap(Catch), - makeArrayRef(unwrap(Args), NumArgs), - makeArrayRef(*OpBundles, NumOpBundles), + ArrayRef<Value*>(unwrap(Args), NumArgs), + ArrayRef<OperandBundleDef>(*OpBundles, NumOpBundles), Name)); } |
