]> granicus.if.org Git - llvm/commit
[llvm-cov] Strip redundant path components from filenames (fix PR31982)
authorVedant Kumar <vsk@apple.com>
Thu, 23 Feb 2017 22:20:32 +0000 (22:20 +0000)
committerVedant Kumar <vsk@apple.com>
Thu, 23 Feb 2017 22:20:32 +0000 (22:20 +0000)
commit10ad4e00d98f214b0afcd561f1c9e50513945714
tree0cd1264a85977171fd3457ae7583deffb5442fc4
parent8580d5005b7d2aacf66e81079625dfd64d1d775f
[llvm-cov] Strip redundant path components from filenames (fix PR31982)

Instead of stripping the longest common prefix off of the filenames in a
report, strip out the longest chain of redundant path components. This
fixes the case in PR31982, where there are two files with the same
prefix, and stripping out the LCP makes things less intelligible.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296029 91177308-0d34-0410-b5e6-96231b3b80d8
test/tools/llvm-cov/Inputs/multiple-files2.covmapping [new file with mode: 0644]
test/tools/llvm-cov/multiple-files.test
tools/llvm-cov/CoverageReport.cpp