summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
-rw-r--r--compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp11
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 7da6ab713..03e6d2149 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);