[PATCH] D20286: [Coverage] Fix an issue where improper coverage mapping data could be loaded for an inline function.

David Li via llvm-commits llvm-commits at lists.llvm.org
Mon May 16 11:00:39 PDT 2016


davidxl added a comment.

It is possible to handle this without requiring changing the hash value.

What is needed is a helper method to check if the coverageMapping record is 'dummy' -- i.e. has any execution count. It not, it can be skipped or replaced.

See CoverageMapping::load method:

  ErrorOr<int64_t> ExecutionCount = Ctx.evaluate(Region.Count);
   if (!ExecutionCount)
     break;


http://reviews.llvm.org/D20286





More information about the llvm-commits mailing list