summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-cov/showHighlightedRanges.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [llvm-cov] Delete custom JSON serialization code (NFC)Vedant Kumar2018-09-121-1/+0
| | | | | | | Teach llvm-cov to use the new llvm JSON library, and remove some redundant/brittle JSON serialization tests. llvm-svn: 342088
* [Coverage] Use the wrapped segment when a line has entry segmentsVedant Kumar2017-11-091-2/+2
| | | | | | | | | We've worked around bugs in the frontend by ignoring the count from wrapped segments when a line has at least one region entry segment. Those frontend bugs are now fixed, so it's time to regenerate the checked-in covmapping files and remove the workaround. llvm-svn: 317761
* [Coverage] Build sorted and unique segmentsVedant Kumar2017-09-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | A coverage segment contains a starting line and column, an execution count, and some other metadata. Clients of the coverage library use segments to prepare line-oriented reports. Users of the coverage library depend on segments being unique and sorted in source order. Currently this is not guaranteed (this is why the clang change which introduced deferred regions was reverted). This commit documents the "unique and sorted" condition and asserts that it holds. It also fixes the SegmentBuilder so that it produces correct output in some edge cases. Testing: I've added unit tests for some edge cases. I've also checked that the new SegmentBuilder implementation is fully covered. Apart from running check-profile and the llvm-cov tests, I've successfully used a stage1 llvm-cov to prepare a coverage report for an instrumented clang binary. Differential Revision: https://reviews.llvm.org/D36813 llvm-svn: 312817
* [llvm-cov] Add an option which maps the location of source directories on ↵Sean Eveson2017-08-141-2/+2
| | | | | | | | | | | | | | | | | | | another machine to your local copies Summary: This patch adds the -path-equivalence option (example: llvm-cov show -path-equivalence=/origin/path,/local/path) which maps the source code path from one machine to another when using `llvm-cov show`. This is similar to the -filename-equivalence option, but doesn't require you to specify all the source files on the command line. This allows you to generate the coverage data on one machine (e.g. in a CI system), and then use llvm-cov on another machine where you have the same code base on a different path. Reviewers: vsk Reviewed By: vsk Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D36391 llvm-svn: 310827
* [llvm-cov] Fix issues with segment highlighting in the html viewVedant Kumar2016-09-081-12/+12
| | | | | | | | | | | | | The text and html coverage views take different approaches to emitting highlighted regions. That's because this problem is easier in the text view: there's no need to worry about escaping text or adding tooltip content to a highlighted snippet. Unfortunately, the html view didn't get region highlighting quite right. This patch fixes the situation, bringing parity between the two views. llvm-svn: 280981
* [llvm-cov] Add a debug mode for source range highlighting (in html)Vedant Kumar2016-07-271-18/+19
| | | | | | | llvm-cov's `-dump' option now emits information which helps debug source range highlighting in html mode. llvm-svn: 276924
* Retry: [llvm-cov] Add support for exporting coverage data to JSONVedant Kumar2016-07-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | This enables users to export coverage information as portable JSON for use by analysis tools and storage in document based databases. The export sub-command is invoked just like the others: llvm-cov export -instr-profile path/to/foo.profdata path/to/foo.binary The resulting JSON contains a list of files and functions. Every file object contains a list of segments, expansions, and a summary of the file's region, function, and line coverage. Every function object contains the function's name and regions. There is also a total summary for the entire object file. Changes since the initial commit (r276813): - Fixed the regexes in the tests to handle Windows filepaths. Patch by Eddie Hurtig! Differential Revision: https://reviews.llvm.org/D22651 llvm-svn: 276818
* Revert "[llvm-cov] Add support for exporting coverage data to JSON"Vedant Kumar2016-07-261-1/+0
| | | | | | | | | This reverts commit r276813. The Windows bots are complaining about some of the filename regexes in the tests: http://bb.pgr.jp/builders/ninja-clang-i686-msc19-R/builds/5299 llvm-svn: 276816
* [llvm-cov] Add support for exporting coverage data to JSONVedant Kumar2016-07-261-0/+1
| | | | | | | | | | | | | | | | | | | | This enables users to export coverage information as portable JSON for use by analysis tools and storage in document based databases. The export sub-command is invoked just like the others: llvm-cov export -instr-profile path/to/foo.profdata path/to/foo.binary The resulting JSON contains a list of files and functions. Every file object contains a list of segments, expansions, and a summary of the file's region, function, and line coverage. Every function object contains the function's name and regions. There is also a total summary for the entire object file. Patch by Eddie Hurtig! Differential Revision: https://reviews.llvm.org/D22651 llvm-svn: 276813
* InstrProf: Remove xfails for big-endian from coverage testsJustin Bogner2015-03-161-3/+0
| | | | | | | | | This still doesn't actually work correctly for big endian input files, but since these tests all use little endian input files they don't actually fail. I'll be committing a real fix for big endian soon, but I don't have proper tests for it yet. llvm-svn: 232354
* InstrProf: Remove CoverageMapping::HasCodeBefore, it isn't usedJustin Bogner2015-02-031-6/+6
| | | | | | | It's not entirely clear to me what this field was meant for, but it's always false. Remove it. llvm-svn: 228034
* llvm-cov: Make debug output more consistentJustin Bogner2014-09-151-1/+1
| | | | | | | | 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: test: add xfail for the big-endian buildbotsAlex Lorenz2014-08-231-0/+3
| | | | llvm-svn: 216310
* llvm-cov: add code coverage tool that's based on coverage mapping format and ↵Alex Lorenz2014-08-221-0/+45
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