[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
Mon May 16 09:11:15 PDT 2016
ikudrin created this revision.
ikudrin added reviewers: bogner, davidxl, vsk.
ikudrin added a subscriber: cfe-commits.
A valid function might not have any statement which affects the hash value, so the hash for that function was zero. The hash value for an unused function is also zero, so the loader could not distinguish the definitions and might load the incorrect one. This patch addresses the issue by assigning a special reserved value as a hash for such a functions.
http://reviews.llvm.org/D20287
Files:
lib/CodeGen/CodeGenPGO.cpp
lib/CodeGen/CoverageMappingGen.cpp
test/CoverageMapping/block-storage-starts-region.m
test/CoverageMapping/decl.c
test/CoverageMapping/implicit-def-in-macro.m
test/CoverageMapping/lambda.cpp
test/CoverageMapping/loops.cpp
test/CoverageMapping/macroception.c
test/CoverageMapping/moremacros.c
test/CoverageMapping/simple-function-hash.cpp
test/CoverageMapping/system_macro.c
test/CoverageMapping/trymacro.cpp
test/Profile/Inputs/c-captured.proftext
test/Profile/Inputs/c-general.proftext
test/Profile/Inputs/c-outdated-data.proftext
test/Profile/Inputs/c-unprofiled.proftext
test/Profile/Inputs/cxx-class.proftext
test/Profile/Inputs/cxx-lambda.proftext
test/Profile/Inputs/cxx-rangefor.proftext
test/Profile/Inputs/cxx-templates.proftext
test/Profile/Inputs/func-entry.proftext
test/Profile/Inputs/max-function-count.proftext
test/Profile/Inputs/objc-general.proftext
test/Profile/Inputs/profile-summary.proftext
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20287.57353.patch
Type: text/x-patch
Size: 12036 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160516/92194b4b/attachment-0001.bin>
More information about the cfe-commits
mailing list