diff --git a/tools/llvm-cov/SourceCoverageView.cpp b/tools/llvm-cov/SourceCoverageView.cpp index 94e963aa6e8..5f873acba0d 100644 --- a/tools/llvm-cov/SourceCoverageView.cpp +++ b/tools/llvm-cov/SourceCoverageView.cpp @@ -206,8 +206,7 @@ gatherLineSubViews(size_t &CurrentIdx, while (CurrentIdx < E && Items[CurrentIdx]->getSubViewsExpansionLine() == LineNo) ++CurrentIdx; - return ArrayRef>(Items.data() + PrevIdx, - CurrentIdx - PrevIdx); + return Items.slice(PrevIdx, CurrentIdx); } void SourceCoverageView::render(raw_ostream &OS, unsigned Offset) {