[PATCH] D20286: [Coverage] Fix an issue where improper coverage mapping data could be loaded for an inline function.
Igor Kudrin via llvm-commits
llvm-commits at lists.llvm.org
Mon May 16 08:37:39 PDT 2016
ikudrin created this revision.
ikudrin added reviewers: bogner, davidxl, vsk.
ikudrin added a subscriber: llvm-commits.
If an inline function is observed but unused in a translation unit, a dummy coverage mapping data with a zero hash is stored for this function. If such a coverage mapping section came earlier than real one, the latter was ignored. As a result, llvm-cov was unable to show coverage information for those functions.
This patch addresses the issue by overriding loaded coverage mapping data with zero hash if a new one has a non-zero hash.
http://reviews.llvm.org/D20286
Files:
lib/ProfileData/Coverage/CoverageMappingReader.cpp
test/tools/llvm-cov/Inputs/prefer_used_to_unused.covmapping
test/tools/llvm-cov/Inputs/prefer_used_to_unused.cpp
test/tools/llvm-cov/Inputs/prefer_used_to_unused.proftext
test/tools/llvm-cov/prefer_used_to_unused.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20286.57349.patch
Type: text/x-patch
Size: 4426 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160516/fc160fb6/attachment.bin>
More information about the llvm-commits
mailing list