The sancov runtime for the (Fuchsia) Zircon kernel delivers results
in the standard format, but as the full array of possible samples
with 0 in uncovered slots. That runtime delivers "live" data and
has no final "export" pass to compactify out the uncovered slots,
and it seems silly to require another offline tool just for that.
Patch By: mcgrathr
Differential Revision: https://reviews.llvm.org/D63695
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365839
91177308-0d34-0410-b5e6-
96231b3b80d8
return make_error_code(errc::illegal_byte_sequence);
}
+ // Ignore slots that are zero, so a runtime implementation is not required
+ // to compactify the data.
+ Addrs->erase(0);
+
return std::unique_ptr<RawCoverage>(new RawCoverage(std::move(Addrs)));
}
llvm::InitializeAllTargetMCs();
llvm::InitializeAllDisassemblers();
- cl::ParseCommandLineOptions(Argc, Argv,
+ cl::ParseCommandLineOptions(Argc, Argv,
"Sanitizer Coverage Processing Tool (sancov)\n\n"
" This tool can extract various coverage-related information from: \n"
" coverage-instrumented binary files, raw .sancov files and their "