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)
commit3c0f124a74ae7b050a5725bd389a9f2751b814aa
tree7cf544ee5128e71fa126c2ea327fc99d9e6e8d2f
parentd03dad8b4be7a130bd1f23faa896e517dab4a689
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.

llvm-svn: 227017
llvm/lib/ProfileData/CoverageMapping.cpp