summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-cov/SourceCoverageView.h
Commit message (Collapse)AuthorAgeFilesLines
* Move coverage related code into a separate library.Easwaran Raman2016-04-291-1/+1
| | | | | | Differential Revision: http://reviews.llvm.org/D19333 llvm-svn: 268089
* InstrProf: Teach llvm-cov to show the max count instead of the lastJustin Bogner2015-02-231-4/+3
| | | | | | | | | | | | 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. llvm-svn: 230263
* llvm-cov: Disentangle the coverage data logic from the display (NFC)Justin Bogner2014-09-201-14/+9
| | | | | | | | | | This splits the logic for actually looking up coverage information from the logic that displays it. These were tangled rather thoroughly so this change is a bit large, but it mostly consists of moving things around. The coverage lookup logic itself now lives in the library, rather than being spread between the library and the tool. llvm-svn: 218184
* llvm-cov: Rework the API for getting the coverage of a file (NFC)Justin Bogner2014-09-171-80/+15
| | | | | | | | | | | | 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
* Add move constructors/assignment to make MSVC happy after r217940Justin Bogner2014-09-171-0/+16
| | | | llvm-svn: 217941
* llvm-cov: Distinguish expansion/instantiation from SourceCoverageViewJustin Bogner2014-09-171-35/+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-2/+2
| | | | | | | 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: Fix an issue with showing regions but not countsJustin Bogner2014-09-151-0/+3
| | | | | | | | | | | 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-20/+8
| | | | | | | 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: add code coverage tool that's based on coverage mapping format and ↵Alex Lorenz2014-08-221-0/+213
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