summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ProfileData/CoverageMapping.cpp
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2015-02-18 19:01:06 +0000
committerJustin Bogner <mail@justinbogner.com>2015-02-18 19:01:06 +0000
commit11ae7789bafcd9186fe6a13a9db44e0c733d327a (patch)
treef7152acbfdec94ff1f44905aabb01fbe380c063c /llvm/lib/ProfileData/CoverageMapping.cpp
parent30f2f3fc98da116c22e04f75e7c7326be563ee19 (diff)
downloadbcm5719-llvm-11ae7789bafcd9186fe6a13a9db44e0c733d327a.tar.gz
bcm5719-llvm-11ae7789bafcd9186fe6a13a9db44e0c733d327a.zip
InstrProf: Don't combine expansion regions with code regions
This was leading to duplicate counts when a code region happened to overlap exactly with an expansion. The combining behaviour only makes sense for code regions. llvm-svn: 229723
Diffstat (limited to 'llvm/lib/ProfileData/CoverageMapping.cpp')
-rw-r--r--llvm/lib/ProfileData/CoverageMapping.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/ProfileData/CoverageMapping.cpp b/llvm/lib/ProfileData/CoverageMapping.cpp
index bef8605df48..a124d792e87 100644
--- a/llvm/lib/ProfileData/CoverageMapping.cpp
+++ b/llvm/lib/ProfileData/CoverageMapping.cpp
@@ -314,7 +314,7 @@ public:
popRegion();
if (PrevRegion && PrevRegion->startLoc() == Region.startLoc() &&
PrevRegion->endLoc() == Region.endLoc()) {
- if (Region.Kind != coverage::CounterMappingRegion::SkippedRegion)
+ if (Region.Kind == coverage::CounterMappingRegion::CodeRegion)
Segments.back().addCount(Region.ExecutionCount);
} else {
// Add this region to the stack.
OpenPOWER on IntegriCloud