Skip to content

Commit fa04eb4

Browse files
committed
Resurrect merge conflict
1 parent af75972 commit fa04eb4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

clang/lib/CodeGen/CoverageMappingGen.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -980,6 +980,11 @@ struct CounterCoverageMappingBuilder
980980
std::pair<Counter, Counter>
981981
getSwitchImplicitDefaultCounterPair(const Stmt *Cond, Counter ParentCount,
982982
Counter CaseCountSum) {
983+
if (llvm::EnableSingleByteCoverage)
984+
// Allocate the new Counter since `subtract(Parent - Sum)` is unavailable.
985+
return {Counter::getZero(), // Folded
986+
Counter::getCounter(CounterMap[Cond].Skipped = NextCounterNum++)};
987+
983988
// Simplify is skipped while building the counters above: it can get
984989
// really slow on top of switches with thousands of cases. Instead,
985990
// trigger simplification by adding zero to the last counter.

0 commit comments

Comments
 (0)