llvm-cov: Combine segments that cover the same location
authorJustin Bogner <mail@justinbogner.com>
Thu, 25 Sep 2014 00:34:18 +0000 (00:34 +0000)
committerJustin Bogner <mail@justinbogner.com>
Thu, 25 Sep 2014 00:34:18 +0000 (00:34 +0000)
commitaacc919bfd62dd0503f394326f458dfbe39218f8
tree3f2904843d0ac308a00d66b9a1b8fcf0c26d9cb5
parent0253523c927438bb0157a33aeb1b76275991c46d
llvm-cov: Combine segments that cover the same location

If we have multiple coverage counts for the same segment, we need to
add them up rather than arbitrarily choosing one. This fixes that and
adds a test with template instantiations to exercise it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218432 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ProfileData/CoverageMapping.h
lib/ProfileData/CoverageMapping.cpp
test/tools/llvm-cov/Inputs/templateInstantiations.covmapping [new file with mode: 0644]
test/tools/llvm-cov/Inputs/templateInstantiations.profdata [new file with mode: 0644]
test/tools/llvm-cov/showTemplateInstantiations.cpp [new file with mode: 0644]