InstrProf: Treat functions with a coverage map but no profile as unreached
authorJustin Bogner <mail@justinbogner.com>
Wed, 13 May 2015 22:03:04 +0000 (22:03 +0000)
committerJustin Bogner <mail@justinbogner.com>
Wed, 13 May 2015 22:03:04 +0000 (22:03 +0000)
commit42ab8c0a90c2c0017d786d6aa180e5114ac04749
treec65da7092c103d2c3621fce1a2c22d2ce87e2ade
parentda645e31a7c949deb51d58bacb6faab89c50c998
InstrProf: Treat functions with a coverage map but no profile as unreached

If we have a coverage mapping but no profile data for a function,
calling it mismatched is misleading. This can just as easily be
unreachable code that was stripped from the binary. Instead, treat
these the same as functions where we have an explicit "zero" coverage
map by setting the count to zero for each mapped region.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237298 91177308-0d34-0410-b5e6-96231b3b80d8
lib/ProfileData/CoverageMapping.cpp
unittests/ProfileData/CoverageMappingTest.cpp