diff options
| author | Dmitri Gribenko <dmitrig@google.com> | 2023-01-11 10:39:01 -0500 |
|---|---|---|
| committer | Augie Fackler <augie@google.com> | 2023-01-11 11:25:15 -0500 |
| commit | 4f0c88f8bda92e16db9b59e5c585ae882dd4a086 (patch) | |
| tree | 16cf5bb40b6463869d71aa2d5e829902f0f916d9 /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp | |
| parent | b22c152958eade17a71d899b29a2d39bcc77aa48 (diff) | |
| download | rust-4f0c88f8bda92e16db9b59e5c585ae882dd4a086.tar.gz rust-4f0c88f8bda92e16db9b59e5c585ae882dd4a086.zip | |
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/CoverageMappingWrapper.cpp')
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp index 7da6ab71309..03e6d2149e9 100644 --- a/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp @@ -28,8 +28,8 @@ extern "C" void LLVMRustCoverageWriteFilenamesSectionToBuffer( for (size_t i = 0; i < FilenamesLen; i++) { FilenameRefs.push_back(std::string(Filenames[i])); } - auto FilenamesWriter = coverage::CoverageFilenamesSectionWriter( - makeArrayRef(FilenameRefs)); + auto FilenamesWriter = + coverage::CoverageFilenamesSectionWriter(ArrayRef<std::string>(FilenameRefs)); RawRustStringOstream OS(BufferOut); FilenamesWriter.write(OS); } @@ -45,15 +45,16 @@ extern "C" void LLVMRustCoverageWriteMappingToBuffer( // Convert from FFI representation to LLVM representation. SmallVector<coverage::CounterMappingRegion, 0> MappingRegions; MappingRegions.reserve(NumMappingRegions); - for (const auto &Region : makeArrayRef(RustMappingRegions, NumMappingRegions)) { + for (const auto &Region : ArrayRef<LLVMRustCounterMappingRegion>( + RustMappingRegions, NumMappingRegions)) { MappingRegions.emplace_back( Region.Count, Region.FalseCount, Region.FileID, Region.ExpandedFileID, Region.LineStart, Region.ColumnStart, Region.LineEnd, Region.ColumnEnd, Region.Kind); } auto CoverageMappingWriter = coverage::CoverageMappingWriter( - makeArrayRef(VirtualFileMappingIDs, NumVirtualFileMappingIDs), - makeArrayRef(Expressions, NumExpressions), + ArrayRef<unsigned>(VirtualFileMappingIDs, NumVirtualFileMappingIDs), + ArrayRef<coverage::CounterExpression>(Expressions, NumExpressions), MappingRegions); RawRustStringOstream OS(BufferOut); CoverageMappingWriter.write(OS); |
