diff options
author | Vedant Kumar <vsk@apple.com> | 2018-08-07 22:25:36 +0000 |
---|---|---|
committer | Vedant Kumar <vsk@apple.com> | 2018-08-07 22:25:36 +0000 |
commit | 381e9d2386facea7f2acc0f8c16a6d0731267f80 (patch) | |
tree | 6b1fff50bddd057dddcf415fba6694d35f8f870b /clang/lib/Basic/VirtualFileSystem.cpp | |
parent | e302fc597afd6d7586c5c5b15cf52f6a34de8a83 (diff) | |
download | llvm-381e9d2386facea7f2acc0f8c16a6d0731267f80.zip llvm-381e9d2386facea7f2acc0f8c16a6d0731267f80.tar.gz llvm-381e9d2386facea7f2acc0f8c16a6d0731267f80.tar.bz2 |
[Coverage] Ignore 'unused' functions with non-zero execution counts
Frontends emit 'unused' coverage mapping records for functions which are
provably unused in a TU. These unused records contain a single counter
with CounterKind::Zero. However, a function may be unused in one TU and
used in another. When this happens, prefer the records with a full set
of counters instead of arbitrarily picking the first loaded record.
There is no impact on the single-TU case. In the multiple-TU case, this
resolves issues causing a function to appear unused when it's not.
Testing: check-{llvm,clang,compiler-rt}
rdar://42981322
llvm-svn: 339194
Diffstat (limited to 'clang/lib/Basic/VirtualFileSystem.cpp')
0 files changed, 0 insertions, 0 deletions