summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-cov
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2014-09-10 06:06:07 +0000
committerJustin Bogner <mail@justinbogner.com>2014-09-10 06:06:07 +0000
commit3f81d4953a0ff276522c08bdf1202ac8ec4c7fbd (patch)
tree949f79b4c753526403d283f11edc4a45278a8848 /llvm/tools/llvm-cov
parent775862a277356642a2ce9fffc85508436c5433c7 (diff)
downloadbcm5719-llvm-3f81d4953a0ff276522c08bdf1202ac8ec4c7fbd.tar.gz
bcm5719-llvm-3f81d4953a0ff276522c08bdf1202ac8ec4c7fbd.zip
llvm-cov: Fix a misuse of ArrayRef::slice I introduced in r217430
It appears this code was completely untested, so using ArrayRef wrong didn't break anything obvious. llvm-svn: 217476
Diffstat (limited to 'llvm/tools/llvm-cov')
-rw-r--r--llvm/tools/llvm-cov/SourceCoverageView.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/tools/llvm-cov/SourceCoverageView.cpp b/llvm/tools/llvm-cov/SourceCoverageView.cpp
index 5f873acba0d..159d74adf38 100644
--- a/llvm/tools/llvm-cov/SourceCoverageView.cpp
+++ b/llvm/tools/llvm-cov/SourceCoverageView.cpp
@@ -206,7 +206,7 @@ gatherLineSubViews(size_t &CurrentIdx,
while (CurrentIdx < E &&
Items[CurrentIdx]->getSubViewsExpansionLine() == LineNo)
++CurrentIdx;
- return Items.slice(PrevIdx, CurrentIdx);
+ return Items.slice(PrevIdx, CurrentIdx - PrevIdx);
}
void SourceCoverageView::render(raw_ostream &OS, unsigned Offset) {
OpenPOWER on IntegriCloud