summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-cov/SourceCoverageView.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* llvm-cov: Fix dropped lines when filters were appliedJustin Bogner2014-09-191-1/+2
| | | | | | | Uncovered lines in the middle of a covered region weren't being shown when filtering to a particular function. llvm-svn: 218109
* llvm-cov: Push some more debug output into the View (NFC)Justin Bogner2014-09-171-0/+4
| | | | llvm-svn: 217984
* llvm-cov: Rework the API for getting the coverage of a file (NFC)Justin Bogner2014-09-171-240/+105
| | | | | | | | | | | | This encapsulates how we handle the coverage regions of a file or function. In the old model, the user had to deal with nested regions, so they needed to maintain their own auxiliary data structures to get any useful information out of this. The new API provides a sequence of non-overlapping coverage segments, which makes it possible to render coverage information in a single pass and avoids a fair amount of extra work. llvm-svn: 217975
* LineIterator: Provide a variant that keeps blank linesJustin Bogner2014-09-171-8/+4
| | | | | | | | It isn't always useful to skip blank lines, as evidenced by the somewhat awkward use of line_iterator in llvm-cov. This adds a knob to control whether or not to skip blanks. llvm-svn: 217960
* llvm-cov: Distinguish expansion/instantiation from SourceCoverageViewJustin Bogner2014-09-171-72/+47
| | | | | | | | | | | | | SourceCoverageView currently has "Kind" and a list of child views, all of which must have either an expansion or an instantiation Kind. In addition to being an error-prone design, this makes it awkward to differentiate between the two child types and adds a number of optionally used members to the type. Split the subview types into their own separate objects, and maintain lists of each rather than one combined "Children" list. llvm-svn: 217940
* llvm-cov: Rename a variable and clean up its usageJustin Bogner2014-09-161-18/+17
| | | | | | | Offset is a terrible name for an indentation / nesting level, and it confuses me every time I look at this code. llvm-svn: 217861
* llvm-cov: Make debug output more consistentJustin Bogner2014-09-151-12/+12
| | | | | | | | This changes the debug output of the llvm-cov tool to consistently write to stderr, and moves the highlighting output closer to where it's relevant. llvm-svn: 217838
* llvm-cov: Fix an issue with showing regions but not countsJustin Bogner2014-09-151-13/+21
| | | | | | | | | | | In r217746, though it was supposed to be NFC, I broke llvm-cov's handling of showing regions without showing counts. This should've shown up in the existing tests, except they were checking debug output that was displayed regardless of what was actually output. I've moved the relevant debug output to a more appropriate place so that the tests catch this kind of thing. llvm-svn: 217835
* llvm-cov: Clean up some redundancy in the view API (NFC)Justin Bogner2014-09-151-13/+17
| | | | | | | This removes the need to pass a starting and ending line when creating a SourceCoverageView, since these are easy to determine. llvm-svn: 217746
* llvm-cov: Fix a misuse of ArrayRef::slice I introduced in r217430Justin Bogner2014-09-101-1/+1
| | | | | | | It appears this code was completely untested, so using ArrayRef wrong didn't break anything obvious. llvm-svn: 217476
* llvm-cov: Use ArrayRef::slice (NFC)Justin Bogner2014-09-091-2/+1
| | | | llvm-svn: 217430
* llvm-cov: Combine two types that were nearly identical (NFC)Justin Bogner2014-09-091-29/+29
| | | | | | | | | llvm-cov had a SourceRange type that was nearly identical to a CountedRegion except that it shaved off a couple of fields. There aren't likely to be enough of these for the minor memory savings to be worth the extra complexity here. llvm-svn: 217417
* llvm-cov: add code coverage tool that's based on coverage mapping format and ↵Alex Lorenz2014-08-221-0/+411
clang's pgo. This commit expands llvm-cov's functionality by adding support for a new code coverage tool that uses LLVM's coverage mapping format and clang's instrumentation based profiling. The gcov compatible tool can be invoked by supplying the 'gcov' command as the first argument, or by modifying the tool's name to end with 'gcov'. Differential Revision: http://reviews.llvm.org/D4445 llvm-svn: 216300
OpenPOWER on IntegriCloud