InstrProf: Don't combine expansion regions with code regions
[oota-llvm.git] / lib / ProfileData / CoverageMapping.cpp
index bef8605df48f2513bb4f875a1ee8496827e2336b..a124d792e8752b0290df1fe737b07aa6ca284135 100644 (file)
@@ -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.