Don't emit coverage mapping for excluded functions
authorPetr Hosek <phosek@google.com>
Thu, 4 Feb 2021 06:57:04 +0000 (22:57 -0800)
committerPetr Hosek <phosek@google.com>
Fri, 5 Feb 2021 21:03:57 +0000 (13:03 -0800)
commit9fd9b5a9c9ece53ce36ec87e7dc8389d0f572476
tree2f0dd616bceb7bac97e3a40a9882336f9ef30335
parenta34b8b879e345397880c1f9f8de4c294dd0b370c
Don't emit coverage mapping for excluded functions

When a function or a file is excluded using -fprofile-list= option,
don't emit coverage mapping as doing so confuses users since those
functions would always have zero count. This also reduces the binary
size considerably in cases where only a few functions or files are
being instrumented.

Differential Revision: https://reviews.llvm.org/D96000
clang/lib/CodeGen/CodeGenPGO.cpp
clang/test/CodeGen/profile-filter.c