summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ProfileData/Coverage/CoverageMappingWriter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove \brief commands from doxygen comments.Adrian Prantl2018-05-011-3/+3
| | | | | | | | | | | | | | | | We've been running doxygen with the autobrief option for a couple of years now. This makes the \brief markers into our comments redundant. Since they are a visual distraction and we don't want to encourage more \brief markers in new code either, this patch removes them all. Patch produced by for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done Differential Revision: https://reviews.llvm.org/D46290 llvm-svn: 331272
* [Coverage] Use gap regions to select better line exec countsVedant Kumar2017-09-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | After clang started emitting deferred regions (r312818), llvm-cov has had a hard time picking reasonable line execuction counts. There have been one or two generic improvements in this area (e.g r310012), but line counts can still report coverage for whitespace instead of code (llvm.org/PR34612). To fix the problem: * Introduce a new region kind so that frontends can explicitly label gap areas. This is done by changing the encoding of the columnEnd field of MappingRegion. This doesn't substantially increase binary size, and makes it easy to maintain backwards-compatibility. * Don't set the line count to a count from a gap area, unless the count comes from a wrapped segment. * Don't highlight gap areas as uncovered. Fixes llvm.org/PR34612. llvm-svn: 313597
* [Coverage] Report errors when reading malformed source regionsVedant Kumar2017-09-081-0/+7
| | | | | | | | | | | | | Each source region has a start and end location. Report an error when the end location does not precede the begin location. The old lineExecutionCounts.covmapping test actually had a buggy source region in it. This commit introduces a regenerated copy of the coverage and moves the old copy to malformedRegions.covmapping, for a test. Differential Revision: https://reviews.llvm.org/D37387 llvm-svn: 312814
* Sort the remaining #include lines in include/... and lib/....Chandler Carruth2017-06-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | I did this a long time ago with a janky python script, but now clang-format has built-in support for this. I fed clang-format every line with a #include and let it re-sort things according to the precise LLVM rules for include ordering baked into clang-format these days. I've reverted a number of files where the results of sorting includes isn't healthy. Either places where we have legacy code relying on particular include ordering (where possible, I'll fix these separately) or where we have particular formatting around #include lines that I didn't want to disturb in this patch. This patch is *entirely* mechanical. If you get merge conflicts or anything, just ignore the changes in this patch and run clang-format over your #include lines in the files. Sorry for any noise here, but it is important to keep these things stable. I was seeing an increasing number of patches with irrelevant re-ordering of #include lines because clang-format was used. This patch at least isolates that churn, makes it easy to skip when resolving conflicts, and gets us to a clean baseline (again). llvm-svn: 304787
* [ProfileData] Fix some Clang-tidy modernize and Include What You Use ↵Eugene Zelenko2017-03-031-13/+22
| | | | | | warnings; other minor fixes (NFC). llvm-svn: 296846
* [Coverage] Make sorting criteria for CounterMappingRegions local.Igor Kudrin2016-08-311-2/+10
| | | | | | | | | | | | Move the comparison function into the only place there it is used, i.e. the call to std::stable_sort in CoverageMappingWriter::write(). Add sorting by region kinds as it is required to ensure stable order in our tests and to simplify D23987. Differential Revision: https://reviews.llvm.org/D24034 llvm-svn: 280198
* Revert "[Coverage] Move logic to encode filenames and mappings into llvm (NFC)"Vedant Kumar2016-06-291-49/+8
| | | | | | | | | This reverts commit 520a8298d8ef676b5da617ba3d2c7fa37381e939 (r273055). This is breaking stage2 instrumented builds with "malformed coverage data" errors. llvm-svn: 274106
* [Coverage] Move logic to encode filenames and mappings into llvm (NFC)Vedant Kumar2016-06-171-8/+49
| | | | | | | | | | | | | | | Currently, frontends which emit source-based code coverage have to duplicate logic to encode filenames and raw coverage mappings properly. This violates an abstraction layer and forces frontends to copy tricky code. Introduce llvm::coverage::encodeFilenamesAndRawMappings() to take care of this. This will help us experiment with zlib-compressing coverage mapping data. llvm-svn: 273055
* Move coverage related code into a separate library.Easwaran Raman2016-04-291-0/+183
Differential Revision: http://reviews.llvm.org/D19333 llvm-svn: 268089
OpenPOWER on IntegriCloud