InstrProf: Avoid creating profile names for symbols in system headers
authorJustin Bogner <mail@justinbogner.com>
Thu, 22 Jan 2015 02:17:23 +0000 (02:17 +0000)
committerJustin Bogner <mail@justinbogner.com>
Thu, 22 Jan 2015 02:17:23 +0000 (02:17 +0000)
commit00270df5175e97951836f4aa721d45c902f4b4ee
treeabf7afa7a53341f63a74700fc36fe0c212317fe6
parente71fb5ce05089b9343c6cda9663c214b9c29c52e
InstrProf: Avoid creating profile names for symbols in system headers

We don't emit any coverage mapping for uncovered functions that come
from system headers, but we were creating a GlobalVariable with each
of their names. This is wasteful since the linker will need to dead
strip the unused symbols, and it can lead to issues when merging
coverage with others TUs that do have coverage for those functions.

llvm-svn: 226764
clang/lib/CodeGen/CodeGenPGO.cpp
clang/test/CoverageMapping/unused_names.c [new file with mode: 0644]