We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent af75972 commit fa04eb4Copy full SHA for fa04eb4
clang/lib/CodeGen/CoverageMappingGen.cpp
@@ -980,6 +980,11 @@ struct CounterCoverageMappingBuilder
980
std::pair<Counter, Counter>
981
getSwitchImplicitDefaultCounterPair(const Stmt *Cond, Counter ParentCount,
982
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
+
988
// Simplify is skipped while building the counters above: it can get
989
// really slow on top of switches with thousands of cases. Instead,
990
// trigger simplification by adding zero to the last counter.
0 commit comments