[PATCH] D20287: [Coverage] Ensure that the hash for a used function is non-zero.

Igor Kudrin via cfe-commits cfe-commits at lists.llvm.org
Wed May 18 02:24:00 PDT 2016

ikudrin added a comment.

In http://reviews.llvm.org/D20287#431055, @davidxl wrote:

> On the other hand, I wonder what is the real root cause of the problem.  The dummy function record does not have its 'own' profile counts, so
>   if (std::error_code EC = ProfileReader.getFunctionCounts(
>               Record.FunctionName, Record.FunctionHash, Counts)) {
> call in CoverageMapping::load (..)
> method should return the the counts of the used  function even with zero functionhash.  What did I miss?

There are no problems in ProfileReader, because only real functions have their profile counts. The problem is in `VersionedCovMapFuncRecordReader::readFunctionRecords(...)`, which has difficulties in distinguishing real and dummy coverage mapping records, so that it might load improper ones in some cases.


More information about the cfe-commits mailing list