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

David Li via cfe-commits cfe-commits at lists.llvm.org
Mon May 16 10:18:26 PDT 2016


davidxl added a comment.

Strictly speaking, this patch requires a version bump of the indexed format. The profile reader also needs to adjust the FunctionHash computation (either using 0 or simple function hash) based on the version of the profile data.

Check with Justin/vsk to see if it is important to keep backward compatability for these simple functions in older profile data.

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?


http://reviews.llvm.org/D20287





More information about the cfe-commits mailing list