7 # This script is meant to post-process a .gcov file for an input source
8 # that was annotated with LCOV_EXCL_START, LCOV_EXCL_STOP, and LCOV_EXCL_LINE
9 # entries. It doesn't understand the LCOV_EXCL_BR* variations.
11 # It replaces unreached reached lines with x:, and reached excluded lines
14 BEGIN { our $excluding = 0; }
16 if (m/LCOV_EXCL_START/) {
19 if ($excluding and m/LCOV_EXCL_STOP/) {
23 my $exclude_this = (m/LCOV_EXCL_LINE/);
25 if ($excluding or $exclude_this) {
27 s{^ (\s*)(\d+):}{$1!!!$2:};
30 if (eof and $excluding) {
31 warn "Runaway LCOV_EXCL_START in $ARGV";