[PATCH] Use map instead of vector to store line counts in llvm-cov
Yuchen Wu
yuchenericwu at hotmail.com
Tue Oct 22 13:57:02 PDT 2013
Use a map instead of vector to store line counts.
There are a few motivations for this:
Using a map allows for checking if line is in map. This differentiates unexecutable lines (such as comments) from unexecuted logical lines of code. "#####" is now outputted in this case, as it is done in gcov.Source files are no longer read in twice: once when storing the line counts, and once when outputting the data.Greatly simplifies the function FileInfo::addLineCount().
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131022/6927f321/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-Use-a-map-instead-of-vector-to-store-line-counts.patch
Type: application/octet-stream
Size: 3613 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131022/6927f321/attachment.obj>
More information about the llvm-commits
mailing list