InstrProf: Handle unknown functions if they consist only of zero-regions
authorJustin Bogner <mail@justinbogner.com>
Wed, 18 Feb 2015 18:40:46 +0000 (18:40 +0000)
committerJustin Bogner <mail@justinbogner.com>
Wed, 18 Feb 2015 18:40:46 +0000 (18:40 +0000)
commite0eae15f6c8684d8c5bd8e7ba00e41d013f41c2e
treef8e41ad1257c9c8fdc00b90d83154fade003d0f3
parenta4976167c45f315662740d8b27a7b11a0d9bd5f5
InstrProf: Handle unknown functions if they consist only of zero-regions

This comes up when we generate coverage for a function but don't end
up emitting the function at all - dead static functions or inline
functions that aren't referenced in a particular TU, for example. In
these cases we'd like to show that the function was never called,
which is trivially true.

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