llvm-cov: Only combine segments if they overlap exactly
authorJustin Bogner <mail@justinbogner.com>
Sat, 24 Jan 2015 20:58:52 +0000 (20:58 +0000)
committerJustin Bogner <mail@justinbogner.com>
Sat, 24 Jan 2015 20:58:52 +0000 (20:58 +0000)
commit65a5e7129877819ebfc7723be3177b039ff11056
tree1405421babef9a417f98b7dcb9d9755a99a8721a
parent62c3d80359a226266114dcc8d32c82f5ab5aef74
llvm-cov: Only combine segments if they overlap exactly

If two coverage segments cover the same area we need to combine them,
as per r218432. OTOH, just because they start at the same place
doesn't mean they cover the same area. This fixes the check to be more
exact about this.

This is pretty hard to test right now. The frontend doesn't currently
emit regions that start at the same place but don't overlap, but some
upcoming work changes this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227017 91177308-0d34-0410-b5e6-96231b3b80d8
lib/ProfileData/CoverageMapping.cpp