InstrProf: Teach llvm-cov to show the max count instead of the last
authorJustin Bogner <mail@justinbogner.com>
Mon, 23 Feb 2015 21:21:34 +0000 (21:21 +0000)
committerJustin Bogner <mail@justinbogner.com>
Mon, 23 Feb 2015 21:21:34 +0000 (21:21 +0000)
commit90c4e8b70ceb3b6089d78554ba01d7df16743c26
treea3bace0fc766a215e37ceda1ac453a982d079b3d
parent5b7c49980662125144c1197f129b86a76e04d8ad
InstrProf: Teach llvm-cov to show the max count instead of the last

When multiple regions start on the same line, llvm-cov was just
showing the count of the last one as the line count. This can be
confusing and misleading for things like one-liner loops, where the
count at the end isn't very interesting, or even "if" statements with
an opening brace at the end of the line.

Instead, use the maximum of all of the region start counts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230263 91177308-0d34-0410-b5e6-96231b3b80d8
test/tools/llvm-cov/showLineExecutionCounts.cpp
tools/llvm-cov/SourceCoverageView.h