summaryrefslogtreecommitdiffstats
path: root/clang/test/CoverageMapping
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2017-09-08 18:44:50 +0000
committerVedant Kumar <vsk@apple.com>2017-09-08 18:44:50 +0000
commit79a1b5ee5ab073d4399e025b7ac9e067938293c4 (patch)
treef77362158cff26f2856949cd768132beb8fd6371 /clang/test/CoverageMapping
parent72c3a11488c411ddb7027e2cecaf7c2467b213c8 (diff)
downloadbcm5719-llvm-79a1b5ee5ab073d4399e025b7ac9e067938293c4.tar.gz
bcm5719-llvm-79a1b5ee5ab073d4399e025b7ac9e067938293c4.zip
[Coverage] Build sorted and unique segments
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
Diffstat (limited to 'clang/test/CoverageMapping')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud